From 040d54b7bce904da7e992bf718362b1f18260e39 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Mon, 7 Jul 2025 12:54:40 -0700 Subject: [PATCH 01/33] modify tc files, add python script to run tests independent of os --- l10n_CM/run_l10n.py | 11 +- run_tests.py | 51 ++++++++ taskcluster/config.yml | 5 + taskcluster/kinds/run-smoke-tests/kind.yml | 128 ++++++++++----------- 4 files changed, 129 insertions(+), 66 deletions(-) create mode 100644 run_tests.py diff --git a/l10n_CM/run_l10n.py b/l10n_CM/run_l10n.py index 41181777d..36084183b 100644 --- a/l10n_CM/run_l10n.py +++ b/l10n_CM/run_l10n.py @@ -13,7 +13,16 @@ valid_flags = {"--run-headless", "-n", "--reruns", "--fx-executable", "--ci"} flag_with_parameter = {"-n", "--reruns"} valid_region = {"US", "CA", "DE", "FR"} -valid_sites = {"demo", "amazon", "walmart", "mediamarkt", "lowes", "etsy", "calvinklein", "bestbuy"} +valid_sites = { + "demo", + "amazon", + "walmart", + "mediamarkt", + "lowes", + "etsy", + "calvinklein", + "bestbuy", +} live_sites = [] LOCALHOST = "127.0.0.1" diff --git a/run_tests.py b/run_tests.py new file mode 100644 index 000000000..eb1b620f1 --- /dev/null +++ b/run_tests.py @@ -0,0 +1,51 @@ +import argparse +import os +import platform +import sys + +import pytest + +LINUX_FX_EXEC = "./firefox/firefox" +WIN_FX_EXEC = "C:\\Program Files\\Custom Firefox\\firefox.exe" +MAC_FX_EXEC = "" + + +def run_suite(parsed_args): + """Convert script / argparse args (parsed_args) to pytest_args""" + pytest_args = parsed_args.added_args or [] + if "--ci" in pytest_args and "--fx-executable" not in pytest_args: + fx_exec = LINUX_FX_EXEC + if platform.system().lower().startswith("win"): + fx_exec = WIN_FX_EXEC + elif platform.system().lower().startswith("darwin"): + fx_exec = MAC_FX_EXEC + pytest_args.extend(["--fx-executable", fx_exec]) + if parsed_args.pyproject: + os.rename(parsed_args.pyproject, "pyproject.toml") + if parsed_args.subset: + tests = open("selected_tests").read() + else: + tests = "tests" + workers = None + if not parsed_args.headed: + workers = "auto" + pytest_args.append("--run-headless") + if parsed_args.workers: + workers = pytest_args.workers + if workers: + pytest_args.extend(["-n", workers]) + pytest_args.extend(tests.split()) + return pytest.main(pytest_args) + + +parser = argparse.ArgumentParser( + prog="Run STARfox tests", description="Run the STARfox suites" +) + +parser.add_argument("added_args", nargs="*") +parser.add_argument("--pyproject", default=None) +parser.add_argument("-w", "--workers", default=None) +parser.add_argument("-s", "--subset", action="store_true") +parser.add_argument("--headed", action="store_true") + +sys.exit(run_suite(parser.parse_args())) diff --git a/taskcluster/config.yml b/taskcluster/config.yml index cacf668ee..6c149ea51 100644 --- a/taskcluster/config.yml +++ b/taskcluster/config.yml @@ -31,3 +31,8 @@ workers: implementation: generic-worker os: linux worker-type: 't-linux-2204-wayland' + t-win11-64-source: + provisioner: '{trust-domain}-t' + implementation: generic-worker + os: windows + worker-type: '{alias}' diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index aa99c7e05..69feb7cbd 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -5,7 +5,6 @@ transforms: task-defaults: label: "Smoke Tests" description: "Runs Smoke Tests and Notifies Slack" - worker-type: t-linux-wayland worker: taskcluster-proxy: true max-run-time: 1800 @@ -18,9 +17,70 @@ task-defaults: scopes: - queue:route:notify.slack-channel.C07AHPJ525V # notify mobile-alerts-sandbox on failure - notify:slack-channel:C07AHPJ525V + notify: + recipients: + - type: slack-channel + channel-id: C07AHPJ525V + status-type: on-defined + content: + slack: + blocks: [ + { + "type": "header", + "text": { + "type": "plain_text", + "text": "firefox-desktop :firefox: ${task.metadata.name} Linux\n " + } + }, + { + "type": "divider" + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*Task*: " + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*Owner*: ${task.metadata.owner}" + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*Commit*: <${task.metadata.source}>" + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*Test Summary*: :debug:" + } + }, + { + "type": "divider" + }, + { + "type": "context", + "elements": [ + { + "type": "mrkdwn", + "text": ":testops-notify: created by Desktop QA Test Engineering" + } + ] + } + ] + text: "{task[name]} with id $taskId has finished!" tasks: linux: + worker-type: t-linux-wayland run: using: run-task cwd: "{checkout}" @@ -29,75 +89,13 @@ tasks: mkdir -p artifacts; pip3 install 'pipenv==2023.11.15'; pip3 install 'ruff>=0.4.8,<0.5'; - mv ./ci_pyproject.toml ./pyproject.toml; pipenv install; ./collect_executables.sh; ./firefox/firefox --version; . ./keyring-unlock.sh pipenv run python3 choose_ci_set.py - pipenv run pytest --fx-executable ./firefox/firefox -n 4 $(cat selected_tests) + pipenv run python3 run_tests.py -s --pyproject ci_pyproject.toml export FAILURE=${?} - mv ./ci_pyproject_headed.toml ./pyproject.toml; pipenv run python3 choose_ci_set.py - pipenv run pytest --fx-executable ./firefox/firefox $(cat selected_tests) + pipenv run python3 run_tests.py -s --headed --pyproject ci_pyproject_headed.toml exit $((${?} | ${FAILURE})) - notify: - recipients: - - type: slack-channel - channel-id: C07AHPJ525V - status-type: on-defined - content: - slack: - blocks: [ - { - "type": "header", - "text": { - "type": "plain_text", - "text": "firefox-desktop :firefox: ${task.metadata.name} Linux\n " - } - }, - { - "type": "divider" - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*Task*: " - } - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*Owner*: ${task.metadata.owner}" - } - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*Commit*: <${task.metadata.source}>" - } - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*Test Summary*: :debug:" - } - }, - { - "type": "divider" - }, - { - "type": "context", - "elements": [ - { - "type": "mrkdwn", - "text": ":testops-notify: created by Desktop QA Test Engineering" - } - ] - } - ] - text: "{task[name]} with id $taskId has finished!" From 9cf590ba57e5d422c80103ce9189cf9d0bda7cfb Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Mon, 7 Jul 2025 13:09:42 -0700 Subject: [PATCH 02/33] run with ci flag --- run_tests.py | 1 + taskcluster/kinds/run-smoke-tests/kind.yml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/run_tests.py b/run_tests.py index eb1b620f1..79bf87579 100644 --- a/run_tests.py +++ b/run_tests.py @@ -35,6 +35,7 @@ def run_suite(parsed_args): if workers: pytest_args.extend(["-n", workers]) pytest_args.extend(tests.split()) + print("pytest " + " ".join(pytest_args)) return pytest.main(pytest_args) diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index 69feb7cbd..90f50547b 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -94,8 +94,8 @@ tasks: ./firefox/firefox --version; . ./keyring-unlock.sh pipenv run python3 choose_ci_set.py - pipenv run python3 run_tests.py -s --pyproject ci_pyproject.toml + pipenv run python3 run_tests.py -s --ci --pyproject ci_pyproject.toml export FAILURE=${?} pipenv run python3 choose_ci_set.py - pipenv run python3 run_tests.py -s --headed --pyproject ci_pyproject_headed.toml + pipenv run python3 run_tests.py -s --ci --headed --pyproject ci_pyproject_headed.toml exit $((${?} | ${FAILURE})) From c44db05a9dc5e0f58e86be5a7a0b6648573b5467 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Mon, 7 Jul 2025 13:18:55 -0700 Subject: [PATCH 03/33] run with ci flag --- run_tests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/run_tests.py b/run_tests.py index 79bf87579..bb12a7bf2 100644 --- a/run_tests.py +++ b/run_tests.py @@ -13,7 +13,7 @@ def run_suite(parsed_args): """Convert script / argparse args (parsed_args) to pytest_args""" pytest_args = parsed_args.added_args or [] - if "--ci" in pytest_args and "--fx-executable" not in pytest_args: + if parsed_args.ci and "--fx-executable" not in pytest_args: fx_exec = LINUX_FX_EXEC if platform.system().lower().startswith("win"): fx_exec = WIN_FX_EXEC @@ -47,6 +47,7 @@ def run_suite(parsed_args): parser.add_argument("--pyproject", default=None) parser.add_argument("-w", "--workers", default=None) parser.add_argument("-s", "--subset", action="store_true") +parser.add_argument("--ci", action="store_true") parser.add_argument("--headed", action="store_true") sys.exit(run_suite(parser.parse_args())) From 0d3ef61819c772eadf5766dc75b34b3ad3c22f02 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Mon, 7 Jul 2025 13:51:36 -0700 Subject: [PATCH 04/33] add windows to tc --- Pipfile | 1 + run_tests.py | 41 ++++++++++++++++++---- taskcluster/kinds/run-smoke-tests/kind.yml | 14 ++++++++ 3 files changed, 50 insertions(+), 6 deletions(-) diff --git a/Pipfile b/Pipfile index 38163e737..19b84d967 100644 --- a/Pipfile +++ b/Pipfile @@ -25,6 +25,7 @@ google-auth = "2.32.0" psutil = "<6.1" pytest-json-report = "==1.5.0" beautifulsoup4 = "4.12.3" +mozinstall = "*" [dev-packages] werkzeug = "==3.0.3" diff --git a/run_tests.py b/run_tests.py index bb12a7bf2..01a345a34 100644 --- a/run_tests.py +++ b/run_tests.py @@ -2,24 +2,52 @@ import os import platform import sys +from pathlib import Path +from subprocess import check_output +import mozinstall import pytest +import requests LINUX_FX_EXEC = "./firefox/firefox" WIN_FX_EXEC = "C:\\Program Files\\Custom Firefox\\firefox.exe" MAC_FX_EXEC = "" +def get_fx_exec(): + fx_exec = LINUX_FX_EXEC + if platform.system().lower().startswith("win"): + fx_exec = WIN_FX_EXEC + elif platform.system().lower().startswith("darwin"): + fx_exec = MAC_FX_EXEC + return fx_exec + + +def install(): + command = ["python", "collect_executables.py"] + if not platform.system().lower().startswith("win"): + command = ["./collect_executables.sh"] + target_filename = "setup.exe" + if platform.system().lower().startswith("darwin"): + target_filename = "Firefox.dmg" + elif platform.system().lower().startswith("linux"): + target_filename = "firefox.tar.xz" + url = check_output(command).decode() + if "collect_executables.py" in command: + resp = requests.get(url) + resp.raise_for_status() + with open(target_filename, "wb") as fh: + fh.write(resp.content) + mozinstall.install(target_filename, Path(get_fx_exec()).parent) + + def run_suite(parsed_args): """Convert script / argparse args (parsed_args) to pytest_args""" pytest_args = parsed_args.added_args or [] + if parsed_args.install: + install() if parsed_args.ci and "--fx-executable" not in pytest_args: - fx_exec = LINUX_FX_EXEC - if platform.system().lower().startswith("win"): - fx_exec = WIN_FX_EXEC - elif platform.system().lower().startswith("darwin"): - fx_exec = MAC_FX_EXEC - pytest_args.extend(["--fx-executable", fx_exec]) + pytest_args.extend(["--fx-executable", get_fx_exec()]) if parsed_args.pyproject: os.rename(parsed_args.pyproject, "pyproject.toml") if parsed_args.subset: @@ -47,6 +75,7 @@ def run_suite(parsed_args): parser.add_argument("--pyproject", default=None) parser.add_argument("-w", "--workers", default=None) parser.add_argument("-s", "--subset", action="store_true") +parser.add_argument("--install", default=None) parser.add_argument("--ci", action="store_true") parser.add_argument("--headed", action="store_true") diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index 90f50547b..08ec77b88 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -99,3 +99,17 @@ tasks: pipenv run python3 choose_ci_set.py pipenv run python3 run_tests.py -s --ci --headed --pyproject ci_pyproject_headed.toml exit $((${?} | ${FAILURE})) + + windows: + worker-type: t-win11-64-source + run: + using: run-task + cwd: "{checkout}" + command: |- + mkdir -p artifacts; + pip3 install 'pipenv==2023.11.15'; + pipenv install; + pipenv run python choose_ci_set.py; + pipenv run python run_tests.py -s --ci --install --pyproject ci_pyproject.toml + export FAILURE=${?} + pipenv run python run_tests.py -s --ci --headed --pyproject ci_pyproject_headed.toml From a66a94587ef07f334cf14712a46910a904a3e831 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Mon, 7 Jul 2025 14:51:37 -0700 Subject: [PATCH 05/33] add windows to tc --- taskcluster/kinds/run-smoke-tests/kind.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index 08ec77b88..5efb3617f 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -3,7 +3,6 @@ transforms: - taskgraph.transforms.notify:transforms task-defaults: - label: "Smoke Tests" description: "Runs Smoke Tests and Notifies Slack" worker: taskcluster-proxy: true @@ -80,6 +79,7 @@ task-defaults: tasks: linux: + label: "Smoke Tests Linux" worker-type: t-linux-wayland run: using: run-task @@ -101,6 +101,7 @@ tasks: exit $((${?} | ${FAILURE})) windows: + label: "Smoke Tests Windows" worker-type: t-win11-64-source run: using: run-task From 1cdac6ac90135ad0f87e9a1960fe1addf57ef28a Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Tue, 8 Jul 2025 08:41:44 -0700 Subject: [PATCH 06/33] try different worker --- taskcluster/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskcluster/config.yml b/taskcluster/config.yml index 6c149ea51..e88bdd068 100644 --- a/taskcluster/config.yml +++ b/taskcluster/config.yml @@ -35,4 +35,4 @@ workers: provisioner: '{trust-domain}-t' implementation: generic-worker os: windows - worker-type: '{alias}' + worker-type: 'win11-64-24h2-source' From 1f353ea02c8db226f9d1c2ba3f27bacbe59bc6fd Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Wed, 9 Jul 2025 09:40:53 -0700 Subject: [PATCH 07/33] get correct trust prov for win --- taskcluster/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskcluster/config.yml b/taskcluster/config.yml index e88bdd068..49c8057cf 100644 --- a/taskcluster/config.yml +++ b/taskcluster/config.yml @@ -32,7 +32,7 @@ workers: os: linux worker-type: 't-linux-2204-wayland' t-win11-64-source: - provisioner: '{trust-domain}-t' + provisioner: 'gecko-t' implementation: generic-worker os: windows worker-type: 'win11-64-24h2-source' From 59723ec6bee8c3f6196c03a480a955f7fdd5008a Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Wed, 9 Jul 2025 10:02:50 -0700 Subject: [PATCH 08/33] use moz-1 b- pools for win --- taskcluster/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/taskcluster/config.yml b/taskcluster/config.yml index 49c8057cf..da8880c0c 100644 --- a/taskcluster/config.yml +++ b/taskcluster/config.yml @@ -32,7 +32,7 @@ workers: os: linux worker-type: 't-linux-2204-wayland' t-win11-64-source: - provisioner: 'gecko-t' + provisioner: '{alias}-1' implementation: generic-worker os: windows - worker-type: 'win11-64-24h2-source' + worker-type: 'b-win2022' From 0971723adf6d57f6ffb74954f8515fd7e6780cf4 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Wed, 9 Jul 2025 11:04:04 -0700 Subject: [PATCH 09/33] use moz-1 b- pools for win --- taskcluster/config.yml | 4 ++-- taskcluster/kinds/run-smoke-tests/kind.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/taskcluster/config.yml b/taskcluster/config.yml index da8880c0c..f8d4a41e6 100644 --- a/taskcluster/config.yml +++ b/taskcluster/config.yml @@ -31,8 +31,8 @@ workers: implementation: generic-worker os: linux worker-type: 't-linux-2204-wayland' - t-win11-64-source: - provisioner: '{alias}-1' + b-win2022: + provisioner: '{trust-domain}-1' implementation: generic-worker os: windows worker-type: 'b-win2022' diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index 5efb3617f..14a5a6097 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -102,7 +102,7 @@ tasks: windows: label: "Smoke Tests Windows" - worker-type: t-win11-64-source + worker-type: b-win2022 run: using: run-task cwd: "{checkout}" From 90b33f3c9416b28223db88ca89f57bd4f1a96892 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Wed, 9 Jul 2025 12:09:46 -0700 Subject: [PATCH 10/33] use moz-1 b- pools for win --- taskcluster/kinds/run-smoke-tests/kind.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index 14a5a6097..6322df8c9 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -108,7 +108,7 @@ tasks: cwd: "{checkout}" command: |- mkdir -p artifacts; - pip3 install 'pipenv==2023.11.15'; + pip install 'pipenv==2023.11.15'; pipenv install; pipenv run python choose_ci_set.py; pipenv run python run_tests.py -s --ci --install --pyproject ci_pyproject.toml From 5c78388bc73dfc7fd30fc3c474377c7622b3e7a9 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Wed, 9 Jul 2025 13:30:41 -0700 Subject: [PATCH 11/33] use moz-1 b- pools for win --- taskcluster/kinds/run-smoke-tests/kind.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index 6322df8c9..349970cdc 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -108,7 +108,7 @@ tasks: cwd: "{checkout}" command: |- mkdir -p artifacts; - pip install 'pipenv==2023.11.15'; + python -m pip install 'pipenv==2023.11.15'; pipenv install; pipenv run python choose_ci_set.py; pipenv run python run_tests.py -s --ci --install --pyproject ci_pyproject.toml From b7127a032eb6e0a38968d6dde35a1537daeca37d Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Wed, 9 Jul 2025 14:38:49 -0700 Subject: [PATCH 12/33] use moz-1 b- pools for win --- taskcluster/kinds/run-smoke-tests/kind.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index 349970cdc..dc5bf3464 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -108,7 +108,8 @@ tasks: cwd: "{checkout}" command: |- mkdir -p artifacts; - python -m pip install 'pipenv==2023.11.15'; + python --version + python -m pip install pipenv==2023.11.15 pipenv install; pipenv run python choose_ci_set.py; pipenv run python run_tests.py -s --ci --install --pyproject ci_pyproject.toml From c97fbe35593fbedc51ca861e6e422de19137385f Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Wed, 9 Jul 2025 14:54:08 -0700 Subject: [PATCH 13/33] use moz-1 b- pools for win --- taskcluster/kinds/run-smoke-tests/kind.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index dc5bf3464..365e5f0eb 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -110,6 +110,7 @@ tasks: mkdir -p artifacts; python --version python -m pip install pipenv==2023.11.15 + $env:PATH += ";C:\mozilla-build\python3\Scripts" pipenv install; pipenv run python choose_ci_set.py; pipenv run python run_tests.py -s --ci --install --pyproject ci_pyproject.toml From 3b07ab651efb479c3db9246e3a95e359f9c9a898 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Wed, 9 Jul 2025 16:30:44 -0700 Subject: [PATCH 14/33] use moz-1 b- pools for win --- taskcluster/kinds/run-smoke-tests/kind.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index 365e5f0eb..6f58f713b 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -110,7 +110,7 @@ tasks: mkdir -p artifacts; python --version python -m pip install pipenv==2023.11.15 - $env:PATH += ";C:\mozilla-build\python3\Scripts" + echo $PWD pipenv install; pipenv run python choose_ci_set.py; pipenv run python run_tests.py -s --ci --install --pyproject ci_pyproject.toml From 900c7b6b32a236cf2b03ee3ac0f81774f4e74bd0 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Wed, 9 Jul 2025 16:55:06 -0700 Subject: [PATCH 15/33] use moz-1 b- pools for win --- taskcluster/kinds/run-smoke-tests/kind.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index 6f58f713b..cf3461e65 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -110,7 +110,7 @@ tasks: mkdir -p artifacts; python --version python -m pip install pipenv==2023.11.15 - echo $PWD + pwd pipenv install; pipenv run python choose_ci_set.py; pipenv run python run_tests.py -s --ci --install --pyproject ci_pyproject.toml From d3d1c431f5ff30a7f0b42ff87b6622e540815573 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Wed, 9 Jul 2025 17:24:46 -0700 Subject: [PATCH 16/33] use moz-1 b- pools for win --- taskcluster/kinds/run-smoke-tests/kind.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index cf3461e65..4d9074ce8 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -110,7 +110,7 @@ tasks: mkdir -p artifacts; python --version python -m pip install pipenv==2023.11.15 - pwd + export PATH=/c/mozilla-build/python3/Scripts:$PATH pipenv install; pipenv run python choose_ci_set.py; pipenv run python run_tests.py -s --ci --install --pyproject ci_pyproject.toml From 76d14d3da91693ee75d879e6904a827fe0f17063 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Wed, 9 Jul 2025 19:38:13 -0700 Subject: [PATCH 17/33] use moz-1 b- pools for win --- taskcluster/kinds/run-smoke-tests/kind.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index 4d9074ce8..f99616eaf 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -108,9 +108,9 @@ tasks: cwd: "{checkout}" command: |- mkdir -p artifacts; - python --version - python -m pip install pipenv==2023.11.15 - export PATH=/c/mozilla-build/python3/Scripts:$PATH + python --version; + python -m pip install pipenv==2023.11.15; + bash export PATH=/c/mozilla-build/python3/Scripts:$PATH; pipenv install; pipenv run python choose_ci_set.py; pipenv run python run_tests.py -s --ci --install --pyproject ci_pyproject.toml From 7f726633cc3762583f01ed1e2436d65888eb72f4 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Thu, 10 Jul 2025 07:48:51 -0700 Subject: [PATCH 18/33] use moz-1 b- pools for win --- taskcluster/kinds/run-smoke-tests/kind.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index f99616eaf..fccb29c90 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -108,9 +108,11 @@ tasks: cwd: "{checkout}" command: |- mkdir -p artifacts; - python --version; - python -m pip install pipenv==2023.11.15; - bash export PATH=/c/mozilla-build/python3/Scripts:$PATH; + python --version + python -m pip install pipenv==2023.11.15 + echo $0 + echo "$$" + PATH=/c/mozilla-build/python3/Scripts:$PATH pipenv install; pipenv run python choose_ci_set.py; pipenv run python run_tests.py -s --ci --install --pyproject ci_pyproject.toml From 317db28c9e7d02ceefa62d5db177eec86769cc6f Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Thu, 10 Jul 2025 09:37:14 -0700 Subject: [PATCH 19/33] use moz-1 b- pools for win --- taskcluster/kinds/run-smoke-tests/kind.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index fccb29c90..92d51481a 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -110,11 +110,8 @@ tasks: mkdir -p artifacts; python --version python -m pip install pipenv==2023.11.15 - echo $0 - echo "$$" - PATH=/c/mozilla-build/python3/Scripts:$PATH - pipenv install; - pipenv run python choose_ci_set.py; + set PATH=%PATH;C:\mozilla-build\python3\Scripts + pipenv install + pipenv run python choose_ci_set.py pipenv run python run_tests.py -s --ci --install --pyproject ci_pyproject.toml - export FAILURE=${?} pipenv run python run_tests.py -s --ci --headed --pyproject ci_pyproject_headed.toml From d98c44079265a3bc41310c71de618bb2e7144639 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Thu, 10 Jul 2025 10:26:30 -0700 Subject: [PATCH 20/33] use moz-1 b- pools for win --- taskcluster/kinds/run-smoke-tests/kind.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index 92d51481a..a9a2e4be1 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -110,7 +110,7 @@ tasks: mkdir -p artifacts; python --version python -m pip install pipenv==2023.11.15 - set PATH=%PATH;C:\mozilla-build\python3\Scripts + "set PATH=%PATH%;C:\mozilla-build\python3\Scripts" pipenv install pipenv run python choose_ci_set.py pipenv run python run_tests.py -s --ci --install --pyproject ci_pyproject.toml From a3b24f22d9155e9a23e9040674a6955464136f6c Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Thu, 10 Jul 2025 12:09:31 -0700 Subject: [PATCH 21/33] use moz-1 b- pools for win --- taskcluster/kinds/run-smoke-tests/kind.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index a9a2e4be1..9fc4d32cf 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -110,7 +110,7 @@ tasks: mkdir -p artifacts; python --version python -m pip install pipenv==2023.11.15 - "set PATH=%PATH%;C:\mozilla-build\python3\Scripts" + "set PATH=%PATH%;C:\mozilla-build\python3\scripts" pipenv install pipenv run python choose_ci_set.py pipenv run python run_tests.py -s --ci --install --pyproject ci_pyproject.toml From 84dfefe71252fd0cb27372fefecd167d16e3c7b5 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Thu, 10 Jul 2025 13:11:07 -0700 Subject: [PATCH 22/33] use moz-1 b- pools for win --- taskcluster/kinds/run-smoke-tests/kind.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index 9fc4d32cf..5e9645f25 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -110,7 +110,8 @@ tasks: mkdir -p artifacts; python --version python -m pip install pipenv==2023.11.15 - "set PATH=%PATH%;C:\mozilla-build\python3\scripts" + dir C:\mozilla-build\python3 + set PATH=%PATH%;C:\mozilla-build\python3\scripts pipenv install pipenv run python choose_ci_set.py pipenv run python run_tests.py -s --ci --install --pyproject ci_pyproject.toml From 5bc4682c62161154e61dcc02ef112549556ac888 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Mon, 14 Jul 2025 09:51:18 -0700 Subject: [PATCH 23/33] use moz-1 b- pools for win --- taskcluster/kinds/run-smoke-tests/kind.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index 5e9645f25..611ecac9f 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -110,7 +110,7 @@ tasks: mkdir -p artifacts; python --version python -m pip install pipenv==2023.11.15 - dir C:\mozilla-build\python3 + dir . set PATH=%PATH%;C:\mozilla-build\python3\scripts pipenv install pipenv run python choose_ci_set.py From a3f0cfab33f6fd7ed310785821d922b76586e184 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Mon, 14 Jul 2025 10:51:19 -0700 Subject: [PATCH 24/33] use moz-1 b- pools for win --- taskcluster/kinds/run-smoke-tests/kind.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index 611ecac9f..c9e26bf72 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -110,6 +110,7 @@ tasks: mkdir -p artifacts; python --version python -m pip install pipenv==2023.11.15 + cd build dir . set PATH=%PATH%;C:\mozilla-build\python3\scripts pipenv install From 4460dcaef4909cdc047a331f05d4907dda61065d Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Mon, 14 Jul 2025 11:20:25 -0700 Subject: [PATCH 25/33] use moz-1 b- pools for win --- taskcluster/kinds/run-smoke-tests/kind.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index c9e26bf72..aa49fc905 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -110,7 +110,7 @@ tasks: mkdir -p artifacts; python --version python -m pip install pipenv==2023.11.15 - cd build + cd build\src dir . set PATH=%PATH%;C:\mozilla-build\python3\scripts pipenv install From cae16b3264d1d47555b5b55e42338d5c6aab3415 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Mon, 14 Jul 2025 12:23:13 -0700 Subject: [PATCH 26/33] use moz-1 b- pools for win --- run_tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run_tests.py b/run_tests.py index 01a345a34..eb07bf855 100644 --- a/run_tests.py +++ b/run_tests.py @@ -49,7 +49,7 @@ def run_suite(parsed_args): if parsed_args.ci and "--fx-executable" not in pytest_args: pytest_args.extend(["--fx-executable", get_fx_exec()]) if parsed_args.pyproject: - os.rename(parsed_args.pyproject, "pyproject.toml") + os.replace(parsed_args.pyproject, "pyproject.toml") if parsed_args.subset: tests = open("selected_tests").read() else: @@ -75,7 +75,7 @@ def run_suite(parsed_args): parser.add_argument("--pyproject", default=None) parser.add_argument("-w", "--workers", default=None) parser.add_argument("-s", "--subset", action="store_true") -parser.add_argument("--install", default=None) +parser.add_argument("--install", action="store_true") parser.add_argument("--ci", action="store_true") parser.add_argument("--headed", action="store_true") From efd43a8ac15e8ba82a3f17f5ebf28f3390968347 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Mon, 14 Jul 2025 14:13:51 -0700 Subject: [PATCH 27/33] use moz-1 b- pools for win --- taskcluster/kinds/run-smoke-tests/kind.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index aa49fc905..30f2e3a60 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -113,7 +113,7 @@ tasks: cd build\src dir . set PATH=%PATH%;C:\mozilla-build\python3\scripts - pipenv install + pipenv install ; pipenv run python choose_ci_set.py pipenv run python run_tests.py -s --ci --install --pyproject ci_pyproject.toml pipenv run python run_tests.py -s --ci --headed --pyproject ci_pyproject_headed.toml From dcfce6b021aa013875b47bbfbc8157ba06d974f5 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Mon, 14 Jul 2025 15:50:09 -0700 Subject: [PATCH 28/33] use moz-1 b- pools for win --- taskcluster/kinds/run-smoke-tests/kind.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index 30f2e3a60..b7a7db735 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -113,7 +113,8 @@ tasks: cd build\src dir . set PATH=%PATH%;C:\mozilla-build\python3\scripts - pipenv install ; + pipenv install + wait 15 pipenv run python choose_ci_set.py pipenv run python run_tests.py -s --ci --install --pyproject ci_pyproject.toml pipenv run python run_tests.py -s --ci --headed --pyproject ci_pyproject_headed.toml From ac91ba5ba34e0d13cf3aba7455e4941b32f81f92 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Thu, 17 Jul 2025 12:59:21 -0700 Subject: [PATCH 29/33] list installed modules --- taskcluster/kinds/run-smoke-tests/kind.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index b7a7db735..158077fe8 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -114,7 +114,7 @@ tasks: dir . set PATH=%PATH%;C:\mozilla-build\python3\scripts pipenv install - wait 15 pipenv run python choose_ci_set.py + pipenv run pip list pipenv run python run_tests.py -s --ci --install --pyproject ci_pyproject.toml pipenv run python run_tests.py -s --ci --headed --pyproject ci_pyproject_headed.toml From cd8fbd5558fb05d62efc768bfcbc60eb01244c55 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Thu, 17 Jul 2025 13:14:38 -0700 Subject: [PATCH 30/33] list installed modules --- taskcluster/kinds/run-smoke-tests/kind.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/taskcluster/kinds/run-smoke-tests/kind.yml b/taskcluster/kinds/run-smoke-tests/kind.yml index 158077fe8..cfe72e07b 100644 --- a/taskcluster/kinds/run-smoke-tests/kind.yml +++ b/taskcluster/kinds/run-smoke-tests/kind.yml @@ -116,5 +116,6 @@ tasks: pipenv install pipenv run python choose_ci_set.py pipenv run pip list + pipenv run python -c "import requests" pipenv run python run_tests.py -s --ci --install --pyproject ci_pyproject.toml pipenv run python run_tests.py -s --ci --headed --pyproject ci_pyproject_headed.toml From 0c936ed622b6587e8a10650efbfdaf7a631848a9 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Thu, 17 Jul 2025 14:02:30 -0700 Subject: [PATCH 31/33] fix pipenv issue --- run_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_tests.py b/run_tests.py index eb07bf855..6da84268b 100644 --- a/run_tests.py +++ b/run_tests.py @@ -24,7 +24,7 @@ def get_fx_exec(): def install(): - command = ["python", "collect_executables.py"] + command = ["pipenv", "run", "python", "collect_executables.py"] if not platform.system().lower().startswith("win"): command = ["./collect_executables.sh"] target_filename = "setup.exe" From b52d919e62c611eab9dd78ca718fb477acecf51e Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Thu, 17 Jul 2025 15:47:45 -0700 Subject: [PATCH 32/33] fix pipenv issue --- run_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_tests.py b/run_tests.py index 6da84268b..e7eed3aec 100644 --- a/run_tests.py +++ b/run_tests.py @@ -32,7 +32,7 @@ def install(): target_filename = "Firefox.dmg" elif platform.system().lower().startswith("linux"): target_filename = "firefox.tar.xz" - url = check_output(command).decode() + url = check_output(command).decode().strip() if "collect_executables.py" in command: resp = requests.get(url) resp.raise_for_status() From c3e02d6b81250c23b73fba010ffe2039df5f3854 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Fri, 18 Jul 2025 08:46:07 -0700 Subject: [PATCH 33/33] fix pipenv issue --- run_tests.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/run_tests.py b/run_tests.py index e7eed3aec..20ed5c5aa 100644 --- a/run_tests.py +++ b/run_tests.py @@ -38,7 +38,10 @@ def install(): resp.raise_for_status() with open(target_filename, "wb") as fh: fh.write(resp.content) - mozinstall.install(target_filename, Path(get_fx_exec()).parent) + installdir = Path(get_fx_exec()).parent + if not installdir.is_dir(): + os.makedirs(installdir, exist_ok=True) + mozinstall.install(target_filename, installdir) def run_suite(parsed_args):