diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /testing/performance/hooks_android_startup.py | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/performance/hooks_android_startup.py')
-rw-r--r-- | testing/performance/hooks_android_startup.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/testing/performance/hooks_android_startup.py b/testing/performance/hooks_android_startup.py index 863df74447..706dff1c0a 100644 --- a/testing/performance/hooks_android_startup.py +++ b/testing/performance/hooks_android_startup.py @@ -16,6 +16,7 @@ from mozperftest.system.android_startup import ( KEY_NAME, KEY_PRODUCT, ) +from mozversioncontrol import get_repository_object HTTP_200_OKAY = 200 @@ -25,8 +26,11 @@ def before_iterations(kw): architecture = "arm64-v8a" if product == "geckoview_example": architecture = "aarch64" - commit_info = subprocess.getoutput("hg log -l 1") - commit_date = re.search(r"date:\s+([:\s\w]+)\s+", str(commit_info)).group(1) + if get_repository_object("").name == "git": + commit_info = subprocess.getoutput("git log --max-count 1") + else: + commit_info = subprocess.getoutput("hg log -l 1") + commit_date = re.search(r"[Dd]ate:\s+([:\s\w]+)\s+", str(commit_info)).group(1) download_date = ( datetime.strptime(commit_date, "%a %b %d %H:%M:%S %Y") - timedelta(days=1) ).strftime(DATETIME_FORMAT) |