diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /testing/mozharness/scripts | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/mozharness/scripts')
-rwxr-xr-x | testing/mozharness/scripts/desktop_unittest.py | 23 | ||||
-rwxr-xr-x | testing/mozharness/scripts/web_platform_tests.py | 11 |
2 files changed, 32 insertions, 2 deletions
diff --git a/testing/mozharness/scripts/desktop_unittest.py b/testing/mozharness/scripts/desktop_unittest.py index e42f507ff9..a08da92f4d 100755 --- a/testing/mozharness/scripts/desktop_unittest.py +++ b/testing/mozharness/scripts/desktop_unittest.py @@ -216,6 +216,15 @@ class DesktopUnittest(TestingMixin, MercurialScript, MozbaseMixin, CodeCoverageM }, ], [ + ["--variant"], + { + "action": "store", + "dest": "variant", + "default": "", + "help": "specify a variant if mozharness needs to setup paths", + }, + ], + [ ["--gpu-required"], { "action": "store_true", @@ -698,6 +707,9 @@ class DesktopUnittest(TestingMixin, MercurialScript, MozbaseMixin, CodeCoverageM if c.get("threads"): base_cmd.extend(["--threads", c["threads"]]) + if c["variant"]: + base_cmd.append("--variant={}".format(c["variant"])) + if c["enable_xorigin_tests"]: base_cmd.append("--enable-xorigin-tests") @@ -926,8 +938,17 @@ class DesktopUnittest(TestingMixin, MercurialScript, MozbaseMixin, CodeCoverageM # All Linux systems need module-null-sink to be loaded, otherwise # media tests fail. + self.run_command("pactl load-module module-null-sink") - self.run_command("pactl list modules short") + modules = self.get_output_from_command("pactl list modules short") + if not [l for l in modules.splitlines() if "module-x11" in l]: + # gnome-session isn't running, missing logind and other system services + # force the task to retry (return 4) + self.return_code = 4 + self.fatal( + "Unable to start PulseAudio and load x11 modules", + exit_code=self.return_code, + ) def stage_files(self): for category in SUITE_CATEGORIES: diff --git a/testing/mozharness/scripts/web_platform_tests.py b/testing/mozharness/scripts/web_platform_tests.py index 4ce679f62d..5af71ad7ad 100755 --- a/testing/mozharness/scripts/web_platform_tests.py +++ b/testing/mozharness/scripts/web_platform_tests.py @@ -513,7 +513,16 @@ class WebPlatformTest(TestingMixin, MercurialScript, CodeCoverageMixin, AndroidM for tag in c["exclude_tag"]: cmd.append(f"--exclude-tag={tag}") - cmd.extend(test_paths) + if mozinfo.info["os"] == "win": + # Because of a limit on the length of CLI command line string length in Windows, we + # should prefer to pass paths by a file instead. + import tempfile + + with tempfile.NamedTemporaryFile(delete=False) as tmp: + tmp.write("\n".join(test_paths).encode()) + cmd.append(f"--include-file={tmp.name}") + else: + cmd.extend(test_paths) return cmd |