diff options
Diffstat (limited to 'testing/mozharness')
10 files changed, 92 insertions, 117 deletions
diff --git a/testing/mozharness/external_tools/machine-configuration.json b/testing/mozharness/external_tools/machine-configuration.json index 601cd29d75..4ae18ce633 100644 --- a/testing/mozharness/external_tools/machine-configuration.json +++ b/testing/mozharness/external_tools/machine-configuration.json @@ -31,8 +31,8 @@ }, "win11-hw": { "screen_resolution": { - "x": 1280, - "y": 1024 + "x": 1920, + "y": 1080 }, "mouse_position": { "x": 1010, diff --git a/testing/mozharness/external_tools/performance-artifact-schema.json b/testing/mozharness/external_tools/performance-artifact-schema.json index 276285007c..2be6a22bf4 100644 --- a/testing/mozharness/external_tools/performance-artifact-schema.json +++ b/testing/mozharness/external_tools/performance-artifact-schema.json @@ -8,7 +8,6 @@ "firefox", "chrome", "chrome-m", - "chromium", "fennec", "geckoview", "refbrow", diff --git a/testing/mozharness/mozharness/mozilla/testing/android.py b/testing/mozharness/mozharness/mozilla/testing/android.py index 7fc2974b32..71dc2bc344 100644 --- a/testing/mozharness/mozharness/mozilla/testing/android.py +++ b/testing/mozharness/mozharness/mozilla/testing/android.py @@ -116,21 +116,6 @@ class AndroidMixin(object): url = "%s/raw-file/%s/%s" % (repo, revision, path) return url - def _tooltool_fetch(self, url, dir): - c = self.config - manifest_path = self.download_file( - url, file_name="releng.manifest", parent_dir=dir - ) - if not os.path.exists(manifest_path): - self.fatal( - "Could not retrieve manifest needed to retrieve " - "artifacts from %s" % manifest_path - ) - # from TooltoolMixin, included in TestingMixin - self.tooltool_fetch( - manifest_path, output_dir=dir, cache=c.get("tooltool_cache", None) - ) - def _launch_emulator(self): env = self.query_env() @@ -507,25 +492,6 @@ class AndroidMixin(object): if reset_dir: del os.environ["MOZ_UPLOAD_DIR"] - def download_hostutils(self, xre_dir): - """ - Download and install hostutils from tooltool. - """ - xre_path = None - self.rmtree(xre_dir) - self.mkdir_p(xre_dir) - if self.config["hostutils_manifest_path"]: - url = self._get_repo_url(self.config["hostutils_manifest_path"]) - self._tooltool_fetch(url, xre_dir) - for p in glob.glob(os.path.join(xre_dir, "host-utils-*")): - if os.path.isdir(p) and os.path.isfile(os.path.join(p, "xpcshell")): - xre_path = p - if not xre_path: - self.fatal("xre path not found in %s" % xre_dir) - else: - self.fatal("configure hostutils_manifest_path!") - return xre_path - def query_package_name(self): if self.app_name is None: # For convenience, assume geckoview.test/geckoview_example when install diff --git a/testing/mozharness/mozharness/mozilla/testing/raptor.py b/testing/mozharness/mozharness/mozilla/testing/raptor.py index e4bca8301f..fcfd66b19f 100644 --- a/testing/mozharness/mozharness/mozilla/testing/raptor.py +++ b/testing/mozharness/mozharness/mozilla/testing/raptor.py @@ -190,7 +190,6 @@ class Raptor( "firefox", "chrome", "chrome-m", - "chromium", "fennec", "geckoview", "refbrow", @@ -848,25 +847,18 @@ class Raptor( def install_chromium_distribution(self): """Install Google Chromium distribution in production""" linux, mac, win = "linux", "mac", "win" - chrome, chromium, chromium_release, chromium_release_android = ( + chrome, chromium_release, chromium_release_android = ( "chrome", - "chromium", "custom-car", "cstm-car-m", ) available_chromium_dists = [ chrome, - chromium, chromium_release, chromium_release_android, ] binary_location = { - chromium: { - linux: ["chrome-linux", "chrome"], - mac: ["chrome-mac", "Chromium.app", "Contents", "MacOS", "Chromium"], - win: ["chrome-win", "Chrome.exe"], - }, chromium_release: { linux: ["chromium", "Default", "chrome"], win: ["chromium", "Default", "chrome.exe"], @@ -1023,7 +1015,8 @@ class Raptor( if os.getenv("PERF_FLAGS"): for option in os.getenv("PERF_FLAGS").split(): if "=" in option: - kw_option, value = option.split("=") + eq_index = option.find("=") + kw_option, value = option[:eq_index], option[eq_index + 1 :] kw_options[kw_option] = value else: options.extend(["--" + option]) diff --git a/testing/mozharness/mozharness/mozilla/testing/talos.py b/testing/mozharness/mozharness/mozilla/testing/talos.py index 3866c18a68..96215b6f79 100755 --- a/testing/mozharness/mozharness/mozilla/testing/talos.py +++ b/testing/mozharness/mozharness/mozilla/testing/talos.py @@ -280,6 +280,18 @@ class Talos( "help": "Take a screenshot when the test fails.", }, ], + [ + ["--pdfPaintChunk"], + { + "type": "int", + "dest": "pdfpaint_chunk", + "default": None, + "help": ( + "Chunk of the pdfpaint test to run (each chunk runs at most 100 pdfs). " + "Defaults to None to run all the pdfs at the same time." + ), + }, + ], ] + testing_config_options + copy.deepcopy(code_coverage_config_options) @@ -558,6 +570,8 @@ class Talos( kw_options["symbolsPath"] = self.symbols_path if self.config.get("project", None): kw_options["project"] = self.config["project"] + if self.config.get("pdfpaint_chunk", None): + kw_options["pdfPaintChunk"] = str(self.config["pdfpaint_chunk"]) kw_options.update(kw) # talos expects tests to be in the format (e.g.) 'ts:tp5:tsvg' @@ -850,6 +864,9 @@ class Talos( env["MOZ_UPLOAD_DIR"] = self.query_abs_dirs()["abs_blob_upload_dir"] if not self.run_local: env["MINIDUMP_STACKWALK"] = self.query_minidump_stackwalk() + env["MOZ_FETCHES_DIR"] = os.environ.get("MOZ_FETCHES_DIR") + else: + env["MOZBUILD_PATH"] = self.config.get("mozbuild_path") env["MINIDUMP_SAVE_PATH"] = self.query_abs_dirs()["abs_blob_upload_dir"] env["RUST_BACKTRACE"] = "full" if not os.path.isdir(env["MOZ_UPLOAD_DIR"]): diff --git a/testing/mozharness/scripts/android_emulator_pgo.py b/testing/mozharness/scripts/android_emulator_pgo.py index c0e9c5e78a..885c4861bb 100644 --- a/testing/mozharness/scripts/android_emulator_pgo.py +++ b/testing/mozharness/scripts/android_emulator_pgo.py @@ -100,9 +100,9 @@ class AndroidProfileRun(TestingMixin, BaseScript, MozbaseMixin, AndroidMixin): dirs = {} dirs["abs_test_install_dir"] = os.path.join(abs_dirs["abs_src_dir"], "testing") - dirs["abs_xre_dir"] = os.path.join(abs_dirs["abs_work_dir"], "hostutils") dirs["abs_blob_upload_dir"] = "/builds/worker/artifacts/blobber_upload_dir" work_dir = os.environ.get("MOZ_FETCHES_DIR") or abs_dirs["abs_work_dir"] + dirs["abs_xre_dir"] = os.path.join(work_dir, "hostutils") dirs["abs_sdk_dir"] = os.path.join(work_dir, "android-sdk-linux") dirs["abs_avds_dir"] = os.path.join(work_dir, "android-device") dirs["abs_bundletool_path"] = os.path.join(work_dir, "bundletool.jar") @@ -134,7 +134,7 @@ class AndroidProfileRun(TestingMixin, BaseScript, MozbaseMixin, AndroidMixin): Download host utilities """ dirs = self.query_abs_dirs() - self.xre_path = self.download_hostutils(dirs["abs_xre_dir"]) + self.xre_path = dirs["abs_xre_dir"] def install(self): """ diff --git a/testing/mozharness/scripts/android_emulator_unittest.py b/testing/mozharness/scripts/android_emulator_unittest.py index 7d798668e5..66b3c0b5fd 100644 --- a/testing/mozharness/scripts/android_emulator_unittest.py +++ b/testing/mozharness/scripts/android_emulator_unittest.py @@ -209,7 +209,6 @@ class AndroidEmulatorTest( dirs["abs_test_bin_dir"] = os.path.join( abs_dirs["abs_work_dir"], "tests", "bin" ) - dirs["abs_xre_dir"] = os.path.join(abs_dirs["abs_work_dir"], "hostutils") dirs["abs_modules_dir"] = os.path.join(dirs["abs_test_install_dir"], "modules") dirs["abs_blob_upload_dir"] = os.path.join( abs_dirs["abs_work_dir"], "blobber_upload_dir" @@ -222,6 +221,7 @@ class AndroidEmulatorTest( dirs["abs_test_install_dir"], "xpcshell" ) work_dir = os.environ.get("MOZ_FETCHES_DIR") or abs_dirs["abs_work_dir"] + dirs["abs_xre_dir"] = os.path.join(work_dir, "hostutils") dirs["abs_sdk_dir"] = os.path.join(work_dir, "android-sdk-linux") dirs["abs_avds_dir"] = os.path.join(work_dir, "android-device") dirs["abs_bundletool_path"] = os.path.join(work_dir, "bundletool.jar") @@ -460,7 +460,7 @@ class AndroidEmulatorTest( suite_categories=self._query_suite_categories() ) dirs = self.query_abs_dirs() - self.xre_path = self.download_hostutils(dirs["abs_xre_dir"]) + self.xre_path = dirs["abs_xre_dir"] def install(self): """ diff --git a/testing/mozharness/scripts/android_hardware_unittest.py b/testing/mozharness/scripts/android_hardware_unittest.py index fffccdf2ab..31ae66f3d9 100644 --- a/testing/mozharness/scripts/android_hardware_unittest.py +++ b/testing/mozharness/scripts/android_hardware_unittest.py @@ -178,7 +178,6 @@ class AndroidHardwareTest( dirs["abs_test_bin_dir"] = os.path.join( abs_dirs["abs_work_dir"], "tests", "bin" ) - dirs["abs_xre_dir"] = os.path.join(abs_dirs["abs_work_dir"], "hostutils") dirs["abs_modules_dir"] = os.path.join(dirs["abs_test_install_dir"], "modules") dirs["abs_blob_upload_dir"] = os.path.join( abs_dirs["abs_work_dir"], "blobber_upload_dir" @@ -190,6 +189,8 @@ class AndroidHardwareTest( dirs["abs_xpcshell_dir"] = os.path.join( dirs["abs_test_install_dir"], "xpcshell" ) + work_dir = os.environ.get("MOZ_FETCHES_DIR") or abs_dirs["abs_work_dir"] + dirs["abs_xre_dir"] = os.path.join(work_dir, "hostutils") for key in dirs.keys(): if key not in abs_dirs: @@ -390,7 +391,7 @@ class AndroidHardwareTest( suite_categories=self._query_suite_categories() ) dirs = self.query_abs_dirs() - self.xre_path = self.download_hostutils(dirs["abs_xre_dir"]) + self.xre_path = dirs["abs_xre_dir"] def install(self): """ diff --git a/testing/mozharness/scripts/release/update-verify-config-creator.py b/testing/mozharness/scripts/release/update-verify-config-creator.py index 9de0175577..7602749c58 100644 --- a/testing/mozharness/scripts/release/update-verify-config-creator.py +++ b/testing/mozharness/scripts/release/update-verify-config-creator.py @@ -7,6 +7,7 @@ import math import os import pprint import re +import subprocess import sys from looseversion import LooseVersion @@ -40,23 +41,23 @@ class CompareVersion(LooseVersion): LooseVersion(versionMap) -def is_triangualar(x): +def is_triangular(x): """Check if a number is triangular (0, 1, 3, 6, 10, 15, ...) see: https://en.wikipedia.org/wiki/Triangular_number#Triangular_roots_and_tests_for_triangular_numbers # noqa - >>> is_triangualar(0) + >>> is_triangular(0) True - >>> is_triangualar(1) + >>> is_triangular(1) True - >>> is_triangualar(2) + >>> is_triangular(2) False - >>> is_triangualar(3) + >>> is_triangular(3) True - >>> is_triangualar(4) + >>> is_triangular(4) False - >>> all(is_triangualar(x) for x in [0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105]) + >>> all(is_triangular(x) for x in [0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105]) True - >>> all(not is_triangualar(x) for x in [4, 5, 8, 9, 11, 17, 25, 29, 39, 44, 59, 61, 72, 98, 112]) + >>> all(not is_triangular(x) for x in [4, 5, 8, 9, 11, 17, 25, 29, 39, 44, 59, 61, 72, 98, 112]) True """ # pylint --py3k W1619 @@ -277,6 +278,13 @@ class UpdateVerifyConfigCreator(BaseScript): "help": "A list of locales to generate full update verify checks for", }, ], + [ + ["--local-repo"], + { + "dest": "local_repo", + "help": "Path to local clone of the repository", + }, + ], ] def __init__(self): @@ -353,7 +361,6 @@ class UpdateVerifyConfigCreator(BaseScript): # we need to use releases_name instead of release_info since esr # string is included in the name. later we rely on this. product, version = release_name.split("-", 1) - tag = "{}_{}_RELEASE".format(product.upper(), version.replace(".", "_")) # Exclude any releases that don't match one of our include version # regexes. This is generally to avoid including versions from other @@ -419,32 +426,11 @@ class UpdateVerifyConfigCreator(BaseScript): ret = self._retry_download(info_file_url, "WARNING") buildID = ret.read().split(b"=")[1].strip().decode("utf-8") - branch = self._get_branch_url(self.config["branch_prefix"], version) - - shipped_locales_url = urljoin( - self.config["hg_server"], - "{}/raw-file/{}/{}/locales/shipped-locales".format( - branch, - tag, - self.config["app_name"], - ), - ) - ret = self._retry_download(shipped_locales_url, "WARNING") - shipped_locales = ret.read().strip().decode("utf-8") - - app_version_url = urljoin( - self.config["hg_server"], - "{}/raw-file/{}/{}/config/version.txt".format( - branch, - tag, - self.config["app_name"], - ), + shipped_locales = self._get_file_from_repo_tag( + product, version, f"{self.config['app_name']}/locales/shipped-locales" ) - app_version = ( - self._retry_download(app_version_url, "WARNING") - .read() - .strip() - .decode("utf-8") + app_version = self._get_file_from_repo_tag( + product, version, f"{self.config['app_name']}/config/version.txt" ) self.log("Adding {} to update paths".format(version), level=INFO) @@ -459,6 +445,36 @@ class UpdateVerifyConfigCreator(BaseScript): if re.match(pattern, version): self.update_paths[version]["marChannelIds"] = mar_channel_ids + def _get_file_from_repo_tag(self, product, version, path): + tag = "{}_{}_RELEASE".format(product.upper(), version.replace(".", "_")) + branch = self._get_branch_url(self.config["branch_prefix"], version) + return self._get_file_from_repo(tag, branch, path) + + def _get_file_from_repo(self, rev, branch, path): + if self.config["local_repo"]: + try: + return ( + subprocess.check_output( + ["hg", "-R", self.config["local_repo"], "cat", "-r", rev, path] + ) + .strip() + .decode("utf-8") + ) + except subprocess.CalledProcessError: + # the tag may not exist locally + pass + + url = urljoin( + self.config["hg_server"], + "{}/raw-file/{}/{}".format( + branch, + rev, + path, + ), + ) + ret = self._retry_download(url, "WARNING") + return ret.read().strip().decode("utf-8") + def gather_info(self): from mozilla_version.gecko import GeckoVersion @@ -520,19 +536,10 @@ class UpdateVerifyConfigCreator(BaseScript): override_certs=self.config.get("override_certs"), ) - to_shipped_locales_url = urljoin( - self.config["hg_server"], - "{}/raw-file/{}/{}/locales/shipped-locales".format( - self.config["repo_path"], - self.config["to_revision"], - self.config["app_name"], - ), - ) - to_shipped_locales = ( - self._retry_download(to_shipped_locales_url, "WARNING") - .read() - .strip() - .decode("utf-8") + to_shipped_locales = self._get_file_from_repo( + self.config["to_revision"], + self.config["repo_path"], + "{}/locales/shipped-locales".format(self.config["app_name"]), ) to_locales = set( getPlatformLocales(to_shipped_locales, self.config["platform"]) @@ -602,7 +609,7 @@ class UpdateVerifyConfigCreator(BaseScript): updater_package=updater_package, ) else: - if this_full_check_locales and is_triangualar(completes_only_index): + if this_full_check_locales and is_triangular(completes_only_index): self.info("Generating full check configs for %s" % fromVersion) self.update_verify_config.addRelease( release=appVersion, @@ -618,7 +625,7 @@ class UpdateVerifyConfigCreator(BaseScript): # Quick test for other locales, no download if len(quick_check_locales) > 0: self.info("Generating quick check configs for %s" % fromVersion) - if not is_triangualar(completes_only_index): + if not is_triangular(completes_only_index): # Assuming we skipped full check locales, using all locales _locales = locales else: diff --git a/testing/mozharness/scripts/web_platform_tests.py b/testing/mozharness/scripts/web_platform_tests.py index e4c3c3983c..4ce679f62d 100755 --- a/testing/mozharness/scripts/web_platform_tests.py +++ b/testing/mozharness/scripts/web_platform_tests.py @@ -281,10 +281,10 @@ class WebPlatformTest(TestingMixin, MercurialScript, CodeCoverageMixin, AndroidM dirs["abs_test_extensions_dir"] = os.path.join( dirs["abs_test_install_dir"], "extensions" ) + work_dir = os.environ.get("MOZ_FETCHES_DIR") or abs_dirs["abs_work_dir"] if self.is_android: - dirs["abs_xre_dir"] = os.path.join(abs_dirs["abs_work_dir"], "hostutils") + dirs["abs_xre_dir"] = os.path.join(work_dir, "hostutils") if self.is_emulator: - work_dir = os.environ.get("MOZ_FETCHES_DIR") or abs_dirs["abs_work_dir"] dirs["abs_sdk_dir"] = os.path.join(work_dir, "android-sdk-linux") dirs["abs_avds_dir"] = os.path.join(work_dir, "android-device") dirs["abs_bundletool_path"] = os.path.join(work_dir, "bundletool.jar") @@ -377,10 +377,6 @@ class WebPlatformTest(TestingMixin, MercurialScript, CodeCoverageMixin, AndroidM "--suppress-handler-traceback", ] - is_windows_7 = ( - mozinfo.info["os"] == "win" and mozinfo.info["os_version"] == "6.1" - ) - if self.repeat > 0: # repeat should repeat the original test, so +1 for first run cmd.append("--repeat=%s" % (self.repeat + 1)) @@ -390,9 +386,9 @@ class WebPlatformTest(TestingMixin, MercurialScript, CodeCoverageMixin, AndroidM or mozinfo.info["tsan"] or "wdspec" in test_types or not c["disable_fission"] - # Bug 1392106 - skia error 0x80070005: Access is denied. - or is_windows_7 - and mozinfo.info["debug"] + # reftest on osx needs to be 1 process + or "reftest" in test_types + and sys.platform.startswith("darwin") ): processes = 1 else: @@ -408,11 +404,7 @@ class WebPlatformTest(TestingMixin, MercurialScript, CodeCoverageMixin, AndroidM else: cmd += ["--binary=%s" % self.binary_path, "--product=firefox"] - if is_windows_7: - # On Windows 7 --install-fonts fails, so fall back to a Firefox-specific codepath - self._install_fonts() - else: - cmd += ["--install-fonts"] + cmd += ["--install-fonts"] for test_type in test_types: cmd.append("--test-type=%s" % test_type) @@ -543,7 +535,7 @@ class WebPlatformTest(TestingMixin, MercurialScript, CodeCoverageMixin, AndroidM ) dirs = self.query_abs_dirs() if self.is_android: - self.xre_path = self.download_hostutils(dirs["abs_xre_dir"]) + self.xre_path = dirs["abs_xre_dir"] # Make sure that the logging directory exists if self.mkdir_p(dirs["abs_blob_upload_dir"]) == -1: self.fatal("Could not create blobber upload directory") |