Skip to content

Commit 15967b4

Browse files
authored
[CI] Enable audio tests in Firefox (#23701)
Following on from #23665, a dummy audio device is now enabled for Firefox in the CI. Multiple attempts were tried (adding Alsa's `snd-dummy` and `snd-aloop`), eventually getting PulseAudio to work. The output from the Firefox runs was manually verified that the tests had run (if they hadn't, due to work being run in the AudioWorklet callback, they'd have timed out and failed).
1 parent cbcbba9 commit 15967b4

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.circleci/config.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,15 +353,26 @@ commands:
353353
command: |
354354
wget -O ~/ff.tar.bz2 "https://download.mozilla.org/?product=firefox-nightly-latest-ssl&os=linux64&lang=en-US"
355355
tar -C ~ -xf ~/ff.tar.bz2
356+
- run:
357+
name: Add audio dependencies
358+
command: |
359+
# This should add and start PulseAudio's dummy mixer. It will warn
360+
# that "This program is not intended to be run as root" but it can
361+
# be ignored.
362+
apt-get update -y
363+
apt-get install -q -y pulseaudio
364+
pulseaudio --start
356365
- run:
357366
name: configure firefox
358367
command: |
368+
# Note: the autoplay pref allows playback without user interaction
359369
mkdir ~/tmp-firefox-profile/
360370
cat > ~/tmp-firefox-profile/user.js \<<EOF
361371
user_pref("gfx.offscreencanvas.enabled", true);
362372
user_pref("javascript.options.shared_memory", true);
363373
user_pref("javascript.options.wasm_memory64", true);
364374
user_pref("dom.postMessage.sharedArrayBuffer.bypassCOOP_COEP.insecure.enabled", true);
375+
user_pref("media.autoplay.default", 0);
365376
EOF
366377
- run:
367378
name: run tests (<< parameters.title >>)
@@ -371,8 +382,6 @@ commands:
371382
# support in headless mode) resolves
372383
EMTEST_LACKS_GRAPHICS_HARDWARE: "1"
373384
EMTEST_LACKS_WEBGPU: "1"
374-
# TODO: replicate with FF the same as CHROME_FLAGS_AUDIO
375-
EMTEST_LACKS_SOUND_HARDWARE: "1"
376385
# OffscreenCanvas support is not yet done in Firefox.
377386
EMTEST_LACKS_OFFSCREEN_CANVAS: "1"
378387
EMTEST_DETECT_TEMPFILE_LEAKS: "0"

0 commit comments

Comments
 (0)