summaryrefslogtreecommitdiffstats
path: root/testing/performance/hooks_android_startup.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /testing/performance/hooks_android_startup.py
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 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.py8
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)