From def92d1b8e9d373e2f6f27c366d578d97d8960c6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:34:50 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- testing/performance/hooks_android_startup.py | 29 +++++++----- testing/performance/hooks_recording.py | 5 +++ .../performance/mach-try-perf/perfdocs/index.rst | 4 -- testing/performance/pageload_sites.json | 3 +- testing/performance/tp7_desktop_sites.json | 51 ++++++++++++++++++++++ 5 files changed, 76 insertions(+), 16 deletions(-) create mode 100644 testing/performance/tp7_desktop_sites.json (limited to 'testing/performance') 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, diff --git a/testing/performance/hooks_recording.py b/testing/performance/hooks_recording.py index 072cbfb727..9fed95e954 100644 --- a/testing/performance/hooks_recording.py +++ b/testing/performance/hooks_recording.py @@ -20,6 +20,11 @@ next_site = None RECORDING_LIST = Path(Path(__file__).parent, "pageload_sites.json") +# Uncomment this to record tp7 desktop sites in CI or locally. +# This is still a WIP (Bug 1831310) and meant to be used by the +# perftest team. +# RECORDING_LIST = Path(Path(__file__).parent, "tp7_desktop_sites.json") + SCM_1_LOGIN_SITES = ("facebook", "netflix") diff --git a/testing/performance/mach-try-perf/perfdocs/index.rst b/testing/performance/mach-try-perf/perfdocs/index.rst index 55db031d0f..a637788624 100644 --- a/testing/performance/mach-try-perf/perfdocs/index.rst +++ b/testing/performance/mach-try-perf/perfdocs/index.rst @@ -347,10 +347,6 @@ If you have any questions which aren't already answered below please reach out t Use the option ``--show-all``. This will let you select tests from the ``./mach try fuzzy --full`` interface directly instead of the categories. You will always be able to find your tests this way. Please be careful with your task selections though as it's easy to run far too many tests in this way! - * **How do I run Fenix tests?** - - Use the options ``--android --fenix``. This will enable Fenix tasks to be selected in the categories you pick, assuming those categories have Fenix tasks available. **Note that the Fenix APK is pulled from the firefox-android projet so any local changes you make will not be applied to it, and the base/new pushes will be testing the same build.** However, if you use the ``--browsertime-upload-apk `` option, you will be able to upload a locally built APK of Fenix to run in try. It will be used in the new revision push. See the ``--help`` for more information on this. - Future Work ----------- diff --git a/testing/performance/pageload_sites.json b/testing/performance/pageload_sites.json index a6d735c37a..2615342def 100644 --- a/testing/performance/pageload_sites.json +++ b/testing/performance/pageload_sites.json @@ -354,7 +354,8 @@ { "login": true, "name": "instagram", - "test_url": "https://www.instagram.com/" + "test_url": "https://www.instagram.com/", + "secondary_url": "https://www.instagram.com/nobelprize_org/" }, { "login": true, diff --git a/testing/performance/tp7_desktop_sites.json b/testing/performance/tp7_desktop_sites.json new file mode 100644 index 0000000000..8d215774f1 --- /dev/null +++ b/testing/performance/tp7_desktop_sites.json @@ -0,0 +1,51 @@ +{ + "desktop": [ + { + "login": false, + "name": "weather", + "test_url": "https://weather.com/en-CA/weather/today/l/43.67%2C-79.42", + "secondary_url": "https://weather.com/en-CA/weather/monthly/l/43.67%2C-79.42", + "dismiss_cookie_prompt": [ + [ + "click.byXpathAndWait", + "/html/body/div[1]/main/div[2]/main/div[10]/section/section/button/svg" + ] + ] + }, + { + "login": false, + "name": "samsung", + "test_url": "https://www.samsung.com/us", + "secondary_url": "https://www.samsung.com/us/mobile", + "dismiss_cookie_prompt": [ + ["click.byXpathAndWait", "/html/body/div[1]/header/div[2]/div/button"] + ] + }, + { + "login": false, + "_comment": "Bug 1890563, setup logins for openai and tiktok", + "name": "openai", + "test_url": "https://openai.com/", + "secondary_url": "https://openai.com/blog" + }, + { + "login": false, + "name": "docomo", + "test_url": "https://www.docomo.ne.jp/", + "secondary_url": "https://www.docomo.ne.jp/iphone/?icid=CRP_menu_to_CRP_IPH" + }, + { + "login": false, + "name": "tiktok", + "_comment": "Bug 1890563, setup logins for openai and tiktok", + "test_url": "https://www.tiktok.com/en", + "secondary_url": "https://www.tiktok.com/explore", + "dismiss_cookie_prompt": [ + [ + "click.byXpathAndWait", + "/html/body/div[5]/div[3]/div/div/div/div[1]/div/div/div[3]/div/div[2]/div/div/div" + ] + ] + } + ] +} -- cgit v1.2.3