From 8dd16259287f58f9273002717ec4d27e97127719 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:43:14 +0200 Subject: Merging upstream version 127.0. Signed-off-by: Daniel Baumann --- testing/mozharness/scripts/desktop_unittest.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'testing/mozharness/scripts/desktop_unittest.py') 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 @@ -215,6 +215,15 @@ class DesktopUnittest(TestingMixin, MercurialScript, MozbaseMixin, CodeCoverageM "help": "Number of total chunks", }, ], + [ + ["--variant"], + { + "action": "store", + "dest": "variant", + "default": "", + "help": "specify a variant if mozharness needs to setup paths", + }, + ], [ ["--gpu-required"], { @@ -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: -- cgit v1.2.3