From 40a355a42d4a9444dc753c04c6608dade2f06a23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:27 +0200 Subject: Adding upstream version 125.0.1. Signed-off-by: Daniel Baumann --- testing/performance/hooks_android_startup.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'testing/performance/hooks_android_startup.py') 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) -- cgit v1.2.3