Bug 1895092 - retry task and worker if we do not start with gnome-session and pulseaudio. r=gbrown

Differential Revision: https://phabricator.services.mozilla.com/D209971
This commit is contained in:
Joel Maher 2024-05-14 18:22:43 +00:00
parent 18273683a5
commit 854a7b1930

View File

@ -938,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: