mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 1926291 - start pipewire instead of pulseaudio on ubuntu 24.04 r=taskgraph-reviewers,bhearsum
Differential Revision: https://phabricator.services.mozilla.com/D226491
This commit is contained in:
parent
413d3a1ac6
commit
28318c8e4a
@ -147,7 +147,6 @@ def mozharness_test_on_docker(config, job, taskdesc):
|
||||
"MOZHARNESS_CONFIG": " ".join(mozharness["config"]),
|
||||
"MOZHARNESS_SCRIPT": mozharness["script"],
|
||||
"MOZILLA_BUILD_URL": {"task-reference": installer},
|
||||
"NEED_PULSEAUDIO": "true",
|
||||
"NEED_WINDOW_MANAGER": "true",
|
||||
"ENABLE_E10S": str(bool(test.get("e10s"))).lower(),
|
||||
"WORKING_DIR": "/builds/worker",
|
||||
@ -156,15 +155,20 @@ def mozharness_test_on_docker(config, job, taskdesc):
|
||||
|
||||
env["PYTHON"] = "python3"
|
||||
|
||||
# Bug 1602701/1601828 - use compiz on ubuntu1804 due to GTK asynchiness
|
||||
# when manipulating windows.
|
||||
if test.get("docker-image", {}).get("in-tree") == "ubuntu1804-test":
|
||||
env["NEED_PULSEAUDIO"] = "true"
|
||||
|
||||
# Bug 1602701/1601828 - use compiz on ubuntu1804 due to GTK asynchiness
|
||||
# when manipulating windows.
|
||||
if "wdspec" in job["run"]["test"]["suite"] or (
|
||||
"marionette" in job["run"]["test"]["suite"]
|
||||
and "headless" not in job["label"]
|
||||
):
|
||||
env.update({"NEED_COMPIZ": "true"})
|
||||
|
||||
if test.get("docker-image", {}).get("in-tree") == "ubuntu2404-test":
|
||||
env["NEED_PIPEWIRE"] = "true"
|
||||
|
||||
# Set MOZ_ENABLE_WAYLAND env variables to enable Wayland backend.
|
||||
if "wayland" in job["label"]:
|
||||
env["MOZ_ENABLE_WAYLAND"] = "1"
|
||||
|
@ -39,6 +39,7 @@ fi
|
||||
: NEED_XVFB ${NEED_XVFB:=true}
|
||||
: NEED_WINDOW_MANAGER ${NEED_WINDOW_MANAGER:=false}
|
||||
: NEED_PULSEAUDIO ${NEED_PULSEAUDIO:=false}
|
||||
: NEED_PIPEWIRE ${NEED_PIPEWIRE:=false}
|
||||
: NEED_COMPIZ ${NEED_COPMPIZ:=false}
|
||||
: START_VNC ${START_VNC:=false}
|
||||
: TASKCLUSTER_INTERACTIVE ${TASKCLUSTER_INTERACTIVE:=false}
|
||||
@ -64,6 +65,20 @@ maybe_start_pulse() {
|
||||
pulseaudio --daemonize --log-level=4 --log-time=1 --log-target=stderr --start --fail -vvvvv --exit-idle-time=-1 --cleanup-shm --dump-conf
|
||||
fi
|
||||
fi
|
||||
if $NEED_PIPEWIRE; then
|
||||
pw_pids=()
|
||||
pipewire &
|
||||
pw_pids+=($!)
|
||||
wireplumber &
|
||||
pw_pids+=($!)
|
||||
pipewire-pulse &
|
||||
pw_pids+=($!)
|
||||
fi
|
||||
}
|
||||
cleanup_pipewire() {
|
||||
if [ -n "$pw_pids" ]; then
|
||||
kill "${pw_pids[@]}"
|
||||
fi
|
||||
}
|
||||
|
||||
# test required parameters are supplied
|
||||
@ -100,6 +115,9 @@ cleanup() {
|
||||
# To share X issues
|
||||
cp "$HOME/.xsession-errors" "$WORKING_DIR/artifacts/public/xsession-errors.log"
|
||||
fi
|
||||
if $NEED_PIPEWIRE; then
|
||||
cleanup_pipewire
|
||||
fi
|
||||
if [ $MOZ_ENABLE_WAYLAND ]; then
|
||||
cleanup_mutter
|
||||
fi
|
||||
@ -184,6 +202,7 @@ if $NEED_WINDOW_MANAGER; then
|
||||
else
|
||||
:
|
||||
fi
|
||||
export XDG_RUNTIME_DIR=$WORKING_DIR
|
||||
|
||||
# Start a session bus early instead of leaving it to Xsession, so that we
|
||||
# can use it for access to e.g. gnome-keyring or the screencast API
|
||||
@ -218,7 +237,6 @@ if $NEED_WINDOW_MANAGER; then
|
||||
# on top of XVfb.
|
||||
if [ $MOZ_ENABLE_WAYLAND ]; then
|
||||
env | grep "DISPLAY"
|
||||
export XDG_RUNTIME_DIR=$WORKING_DIR
|
||||
mutter --display=:0 --wayland --nested &
|
||||
export WAYLAND_DISPLAY=wayland-0
|
||||
retry_count=0
|
||||
|
Loading…
Reference in New Issue
Block a user