tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit e146e1460cd6809caaf068d1371128981b826b40
parent 9ecd6af2350a83bdeda242209f32a1c8bc74fe88
Author: Joel Maher <joel.maher@gmail.com>
Date:   Sat, 18 Oct 2025 01:33:10 +0000

Bug 1995044 - update per_test_base.py mozinfo to include variants and up to date info. r=ci-and-tooling,aryx

Differential Revision: https://phabricator.services.mozilla.com/D269094

Diffstat:
Mtesting/mozharness/mozharness/mozilla/testing/per_test_base.py | 88+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------
1 file changed, 77 insertions(+), 11 deletions(-)

diff --git a/testing/mozharness/mozharness/mozilla/testing/per_test_base.py b/testing/mozharness/mozharness/mozilla/testing/per_test_base.py @@ -38,7 +38,7 @@ class SingleTestMixin: return True return False - def _find_misc_tests(self, dirs, changed_files, gpu=False): + def _find_misc_tests(self, dirs, changed_files, mozinfo, gpu=False): manifests = [ ( os.path.join(dirs["abs_mochitest_dir"], "tests", "mochitest.toml"), @@ -63,7 +63,6 @@ class SingleTestMixin: "xpcshell", ), ] - is_fission = "fission.autostart=true" in self.config.get("extra_prefs", []) tests_by_path = {} all_disabled = [] # HACK: import here so we don't need import for rest of class @@ -189,7 +188,7 @@ class SingleTestMixin: ) continue - if is_fission and ( + if mozinfo["fission"] and ( (entry[0] == "mochitest-a11y") or (entry[0] == "mochitest-chrome") ): self.info( @@ -342,19 +341,86 @@ class SingleTestMixin: dirs = self.query_abs_dirs() mozinfo.find_and_update_from_json(dirs["abs_test_install_dir"]) - e10s = self.config.get("e10s", False) - mozinfo.update({"e10s": e10s}) - is_fission = "fission.autostart=true" in self.config.get("extra_prefs", []) - mozinfo.update({"fission": is_fission}) - headless = self.config.get("headless", False) - mozinfo.update({"headless": headless}) if mozinfo.info["buildapp"] == "mobile/android": # extra android mozinfo normally comes from device queries, but this # code may run before the device is ready, so rely on configuration mozinfo.update( {"android_version": str(self.config.get("android_version", 24))} ) + mozinfo.update( + { + "os_version": mozinfo.platforminfo.android_api_to_os_version( + self.config.get("android_version", 24) + ) + } + ) mozinfo.update({"is_emulator": self.config.get("is_emulator", True)}) + + # variants + mozinfo.update({"e10s": self.config.get("e10s", True)}) + mozinfo.update( + { + "fission": "fission.autostart=false" + not in self.config.get("extra_prefs", []) + } + ) + mozinfo.update({"headless": self.config.get("headless", False)}) + mozinfo.update({"a11y_checks": self.config.get("a11y_checks", False)}) + mozinfo.update( + { + "socketprocess_e10s": "media.peerconnection.mtransport_process=true" + in self.config.get("extra_prefs", []) + } + ) + mozinfo.update( + { + "socketprocess_networking": "network.http.network_access_on_socket_process.enabled=true" + in self.config.get("extra_prefs", []) + } + ) + mozinfo.update( + { + "swgl": "gfx.webrender.software=true" + in self.config.get("extra_prefs", []) + } + ) + mozinfo.update( + {"wmfme": "media-engine-compatible" in self.config.get("test_tags", [])} + ) + mozinfo.update( + { + "emewmf": "media.wmf.media-engine.enabled=2" + in self.config.get("extra_prefs", []) + } + ) + mozinfo.update({"mda_gpu": "media-gpu" in self.config.get("test_tags", [])}) + mozinfo.update( + { + "nogpu": "layers.gpu-process.enabled=false" + in self.config.get("extra_prefs", []) + } + ) + mozinfo.update({"msix": "msix" in self.config.get("variant", "")}) + mozinfo.update( + {"vertical_tab": "vertical-tabs" in self.config.get("test_tags", [])} + ) + mozinfo.update( + {"inc_origin_init": "inc-origin-init" in self.config.get("test_tags", [])} + ) + mozinfo.update( + {"privateBrowsing": "privatebrowsing" in self.config.get("test_tags", [])} + ) + mozinfo.update( + { + "sessionHistoryInParent": "fission.disableSessionHistoryInParent=true" + in self.config.get("extra_prefs", []) + } + ) + mozinfo.update({"http2": self.config.get("useHttp2Server", False)}) + mozinfo.update({"http3": self.config.get("useHttp3Server", False)}) + mozinfo.update({"xorigin": self.config.get("enable_xorigin_tests", False)}) + mozinfo.update({"condprof": self.config.get("conditioned_profile", False)}) + mozinfo.update({"verify": True}) self.info("Per-test run using mozinfo: %s" % str(mozinfo.info)) @@ -398,9 +464,9 @@ class SingleTestMixin: if self.config.get("per_test_category") == "web-platform": self._find_wpt_tests(dirs, changed_files) elif self.config.get("gpu_required", False) is not False: - self._find_misc_tests(dirs, changed_files, gpu=True) + self._find_misc_tests(dirs, changed_files, mozinfo, gpu=True) else: - self._find_misc_tests(dirs, changed_files) + self._find_misc_tests(dirs, changed_files, mozinfo) # per test mode run specific tests from any given test suite # _find_*_tests organizes tests to run into suites so we can