summaryrefslogtreecommitdiffstats
path: root/testing/performance/hooks_android_startup.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
commitd8bbc7858622b6d9c278469aab701ca0b609cddf (patch)
treeeff41dc61d9f714852212739e6b3738b82a2af87 /testing/performance/hooks_android_startup.py
parentReleasing progress-linux version 125.0.3-1~progress7.99u1. (diff)
downloadfirefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz
firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip
Merging upstream version 126.0.
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.py29
1 files changed, 18 insertions, 11 deletions
diff --git a/testing/performance/hooks_android_startup.py b/testing/performance/hooks_android_startup.py
index 706dff1c0a..4a7a1bbe1a 100644
--- a/testing/performance/hooks_android_startup.py
+++ b/testing/performance/hooks_android_startup.py
@@ -15,10 +15,12 @@ from mozperftest.system.android_startup import (
KEY_DATETIME,
KEY_NAME,
KEY_PRODUCT,
+ MOZILLA_PRODUCTS,
)
from mozversioncontrol import get_repository_object
HTTP_200_OKAY = 200
+MONO_REPO_MIGRATION_DAY = datetime(2024, 3, 18)
def before_iterations(kw):
@@ -31,18 +33,23 @@ def before_iterations(kw):
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)
-
- nightly_url = BASE_URL_DICT[product].format(
- date=download_date, architecture=architecture
+ download_date = datetime.strptime(commit_date, "%a %b %d %H:%M:%S %Y") - timedelta(
+ days=1
)
- filename = f"{product}_nightly_{architecture}.apk"
- print("Fetching {}...".format(filename), end="", flush=True)
- download_apk_as_date(nightly_url, download_date, filename)
- print(f"Downloaded {product} for date: {download_date}")
-
+ pre_mono_repo = ""
+ if download_date < MONO_REPO_MIGRATION_DAY and product != "geckoview_example":
+ pre_mono_repo = "-pre-mono-repo"
+ download_date = download_date.strftime(DATETIME_FORMAT)
+ if product in MOZILLA_PRODUCTS:
+ nightly_url = BASE_URL_DICT[product + pre_mono_repo].format(
+ date=download_date, architecture=architecture
+ )
+ filename = f"{product}_nightly_{architecture}.apk"
+ print("Fetching {}...".format(filename), end="", flush=True)
+ download_apk_as_date(nightly_url, download_date, filename)
+ print(f"Downloaded {product} for date: {download_date}")
+ else:
+ filename = product + ".apk"
kw["apk_metadata"] = {
KEY_NAME: filename,
KEY_DATETIME: download_date,