From 51984d5c6c7359ab8e55c841a10aa49da5a2bf64 Mon Sep 17 00:00:00 2001 From: Chris AtLee Date: Wed, 13 May 2020 21:13:51 +0000 Subject: [PATCH] Bug 1557741: Use fetches for tests that need geckodriver. r=jgraham Differential Revision: https://phabricator.services.mozilla.com/D74645 --- taskcluster/ci/test/web-platform.yml | 55 +++++++++++++++++++ .../configs/web_platform_tests/prod_config.py | 3 +- .../web_platform_tests/prod_config_android.py | 2 +- .../web_platform_tests/prod_config_mac.py | 3 +- .../web_platform_tests/prod_config_windows.py | 4 +- .../prod_config_windows_taskcluster.py | 3 +- .../mozharness/mozilla/testing/testbase.py | 6 ++ 7 files changed, 66 insertions(+), 10 deletions(-) diff --git a/taskcluster/ci/test/web-platform.yml b/taskcluster/ci/test/web-platform.yml index e0061ae8857e..07396c9a9615 100644 --- a/taskcluster/ci/test/web-platform.yml +++ b/taskcluster/ci/test/web-platform.yml @@ -189,6 +189,34 @@ web-platform-tests-wdspec: linux.*64-asan/opt: 2 .*-qr/.*: 2 # can't be tier-1 if it's not running on integration branches default: default + fetches: + toolchain: + by-test-platform: + linux.*64.*: + - linux64-geckodriver + - linux64-minidump-stackwalk + - linux64-fix-stacks + linux.*32.*: + - linux32-geckodriver + - linux64-minidump-stackwalk + - linux64-fix-stacks + macosx.*: + - macosx64-geckodriver + - macosx64-minidump-stackwalk + - macosx64-fix-stacks + win.*-32.*: + - win32-geckodriver + - win32-minidump-stackwalk + - win32-fix-stacks + win.*-64.*: + - win64-geckodriver + - win32-minidump-stackwalk + - win32-fix-stacks + default: + - linux64-minidump-stackwalk + - linux64-fix-stacks + - linux64-geckodriver + web-platform-tests-wdspec-headless: description: "Web platform webdriver-spec headless run" @@ -210,6 +238,33 @@ web-platform-tests-wdspec-headless: - --test-type=wdspec - --setpref=toolkit.asyncshutdown.log=true - --headless + fetches: + toolchain: + by-test-platform: + linux.*64.*: + - linux64-geckodriver + - linux64-minidump-stackwalk + - linux64-fix-stacks + linux.*32.*: + - linux32-geckodriver + - linux64-minidump-stackwalk + - linux64-fix-stacks + macosx.*: + - macosx64-geckodriver + - macosx64-minidump-stackwalk + - macosx64-fix-stacks + win.*-32.*: + - win32-geckodriver + - win32-minidump-stackwalk + - win32-fix-stacks + win.*-64.*: + - win64-geckodriver + - win32-minidump-stackwalk + - win32-fix-stacks + default: + - linux64-minidump-stackwalk + - linux64-fix-stacks + - linux64-geckodriver web-platform-tests-crashtest: description: "Web platform crashtests run" diff --git a/testing/mozharness/configs/web_platform_tests/prod_config.py b/testing/mozharness/configs/web_platform_tests/prod_config.py index ccdad8cc3b1f..259e1c1c0b8d 100644 --- a/testing/mozharness/configs/web_platform_tests/prod_config.py +++ b/testing/mozharness/configs/web_platform_tests/prod_config.py @@ -21,8 +21,7 @@ config = { "--certutil-binary=%(test_install_path)s/bin/certutil", ], - # this would normally be in "exes", but "exes" is clobbered by remove_executables - "geckodriver": os.path.join("%(abs_test_bin_dir)s", "geckodriver"), + "geckodriver": os.path.join("%(abs_fetches_dir)s", "geckodriver"), "per_test_category": "web-platform", diff --git a/testing/mozharness/configs/web_platform_tests/prod_config_android.py b/testing/mozharness/configs/web_platform_tests/prod_config_android.py index c0220c096dcd..3abf2ba585f2 100644 --- a/testing/mozharness/configs/web_platform_tests/prod_config_android.py +++ b/testing/mozharness/configs/web_platform_tests/prod_config_android.py @@ -17,7 +17,7 @@ config = { ], "avds_dir": "/builds/worker/workspace/build/.android", "binary_path": "/tmp", - "geckodriver": "%(abs_test_bin_dir)s/geckodriver", + "geckodriver": "%(abs_fetches_dir)s/geckodriver", "hostutils_manifest_path": "testing/config/tooltool-manifests/linux64/hostutils.manifest", "log_tbpl_level": "info", "log_raw_level": "info", diff --git a/testing/mozharness/configs/web_platform_tests/prod_config_mac.py b/testing/mozharness/configs/web_platform_tests/prod_config_mac.py index 4a5dfba8c0dc..cfdbfd243998 100644 --- a/testing/mozharness/configs/web_platform_tests/prod_config_mac.py +++ b/testing/mozharness/configs/web_platform_tests/prod_config_mac.py @@ -21,8 +21,7 @@ config = { "--certutil-binary=%(test_install_path)s/bin/certutil", ], - # this would normally be in "exes", but "exes" is clobbered by remove_executables - "geckodriver": os.path.join("%(abs_test_bin_dir)s", "geckodriver"), + "geckodriver": os.path.join("%(abs_fetches_dir)s", "geckodriver"), "per_test_category": "web-platform", diff --git a/testing/mozharness/configs/web_platform_tests/prod_config_windows.py b/testing/mozharness/configs/web_platform_tests/prod_config_windows.py index 219503cc1517..d175e7a22a50 100644 --- a/testing/mozharness/configs/web_platform_tests/prod_config_windows.py +++ b/testing/mozharness/configs/web_platform_tests/prod_config_windows.py @@ -30,9 +30,7 @@ config = { 'hg': 'c:/mozilla-build/hg/hg', }, - - # this would normally be in "exes", but "exes" is clobbered by remove_executables - "geckodriver": os.path.join("%(abs_test_bin_dir)s", "geckodriver.exe"), + "geckodriver": os.path.join("%(abs_fetches_dir)s", "geckodriver.exe"), "per_test_category": "web-platform", diff --git a/testing/mozharness/configs/web_platform_tests/prod_config_windows_taskcluster.py b/testing/mozharness/configs/web_platform_tests/prod_config_windows_taskcluster.py index ff646efb10ae..24ad2f17a2ce 100644 --- a/testing/mozharness/configs/web_platform_tests/prod_config_windows_taskcluster.py +++ b/testing/mozharness/configs/web_platform_tests/prod_config_windows_taskcluster.py @@ -105,8 +105,7 @@ config = { }, ], - # this would normally be in "exes", but "exes" is clobbered by remove_executables - "geckodriver": os.path.join("%(abs_test_bin_dir)s", "geckodriver.exe"), + "geckodriver": os.path.join("%(abs_fetches_dir)s", "geckodriver.exe"), "per_test_category": "web-platform", } diff --git a/testing/mozharness/mozharness/mozilla/testing/testbase.py b/testing/mozharness/mozharness/mozilla/testing/testbase.py index a12b42ff7fa2..4756c57e20d7 100755 --- a/testing/mozharness/mozharness/mozilla/testing/testbase.py +++ b/testing/mozharness/mozharness/mozilla/testing/testbase.py @@ -648,3 +648,9 @@ Did you run with --create-virtualenv? Is mozinstall in virtualenv_modules?""") c = self.config if c.get('run_cmd_checks_enabled'): self._run_cmd_checks(c.get('postflight_run_cmd_suites', [])) + + def query_abs_dirs(self): + abs_dirs = super(TestingMixin, self).query_abs_dirs() + if 'MOZ_FETCHES_DIR' in os.environ: + abs_dirs['abs_fetches_dir'] = os.environ['MOZ_FETCHES_DIR'] + return abs_dirs