Skip to content

Commit

Permalink
Try dummy audio for FF; remove LACKS_SOUND_HARDWARE
Browse files Browse the repository at this point in the history
  • Loading branch information
cwoffenden committed Feb 15, 2025
1 parent 9bcf181 commit f9a781b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -306,15 +306,16 @@ commands:
- run:
name: run tests (<< parameters.title >>)
environment:
EMTEST_LACKS_SOUND_HARDWARE: "1"
EMTEST_DETECT_TEMPFILE_LEAKS: "0"
# --no-sandbox because we are running as root and chrome requires
# this flag for now: https://crbug.com/638180
CHROME_FLAGS_BASE: "--no-first-run -start-maximized --no-sandbox --use-gl=swiftshader --user-data-dir=/tmp/chrome-emscripten-profile --enable-experimental-web-platform-features"
CHROME_FLAGS_HEADLESS: "--headless=new --remote-debugging-port=1234"
CHROME_FLAGS_WASM: "--enable-experimental-webassembly-features --js-flags=\"--experimental-wasm-stack-switching --experimental-wasm-type-reflection\""
CHROME_FLAGS_NOCACHE: "--disk-cache-dir=/dev/null --disk-cache-size=1 --media-cache-size=1 --disable-application-cache --incognito"
CHROME_FLAGS_AUDIO: "--autoplay-policy=no-user-gesture-required --use-fake-device-for-media-stream"
# The runners lack sound hardware so fallback to a dummy device (and
# bypass the user gesture so audio tests work without interaction)
CHROME_FLAGS_AUDIO: " --use-fake-device-for-media-stream --autoplay-policy=no-user-gesture-required"
command: |
export EMTEST_BROWSER="/usr/bin/google-chrome $CHROME_FLAGS_BASE $CHROME_FLAGS_HEADLESS $CHROME_FLAGS_WASM $CHROME_FLAGS_NOCACHE $CHROME_FLAGS_AUDIO"
# There are tests in the browser test suite that using libraries
Expand Down Expand Up @@ -361,6 +362,7 @@ commands:
user_pref("javascript.options.shared_memory", true);
user_pref("javascript.options.wasm_memory64", true);
user_pref("dom.postMessage.sharedArrayBuffer.bypassCOOP_COEP.insecure.enabled", true);
user_pref("media.navigator.streams.fake", true);
user_pref("media.autoplay.default", 0);
EOF
- run:
Expand All @@ -371,11 +373,12 @@ commands:
# support in headless mode) resolves
EMTEST_LACKS_GRAPHICS_HARDWARE: "1"
EMTEST_LACKS_WEBGPU: "1"
EMTEST_LACKS_SOUND_HARDWARE: "1"
# OffscreenCanvas support is not yet done in Firefox.
EMTEST_LACKS_OFFSCREEN_CANVAS: "1"
EMTEST_DETECT_TEMPFILE_LEAKS: "0"
DISPLAY: ":0"
# Note: as per Chrome, the FF profile enables a dummy audio device
# (so doesn't need the EMTEST_LACKS_SOUND_HARDWARE var)
command: |
export EMTEST_BROWSER="$HOME/firefox/firefox -headless -profile $HOME/tmp-firefox-profile/"
# There are tests in the browser test suite that using libraries
Expand Down

0 comments on commit f9a781b

Please sign in to comment.