Skip to content

Commit 0c5b684

Browse files
committed
Add sockets tests for chrome
1 parent 58eeb23 commit 0c5b684

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

.circleci/config.yml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ commands:
212212
openbox --exit
213213
wait || true # wait for startx to shutdown cleanly, or not
214214
test-chrome:
215-
description: "Runs emscripten tests under firefox"
215+
description: "Runs emscripten browser tests under chrome"
216216
steps:
217217
- checkout
218218
- attach_workspace:
@@ -237,6 +237,32 @@ commands:
237237
command: |
238238
export EMTEST_BROWSER="/usr/bin/google-chrome $CHROME_FLAGS_BASE $CHROME_FLAGS_HEADLESS $CHROME_FLAGS_WASM $CHROME_FLAGS_NOCACHE"
239239
python3 tests/runner.py browser
240+
test-sockets-chrome:
241+
description: "Runs emscripten sockets tests under chrome"
242+
steps:
243+
- checkout
244+
- attach_workspace:
245+
# Must be absolute path or relative path from working_directory
246+
at: ~/
247+
- run:
248+
name: download chrome
249+
command: |
250+
wget -O ~/chrome.deb https://dl.google.com/linux/direct/google-chrome-beta_current_amd64.deb
251+
dpkg -i ~/chrome.deb
252+
- run:
253+
name: run sockets tests
254+
environment:
255+
EMTEST_LACKS_SOUND_HARDWARE: "1"
256+
EMTEST_DETECT_TEMPFILE_LEAKS: "0"
257+
# --no-sandbox becasue we are running as root and chrome requires
258+
# this flag for now: https://crbug.com/638180
259+
CHROME_FLAGS_BASE: "--no-first-run -start-maximized --no-sandbox --use-gl=swiftshader --user-data-dir=/tmp/chrome-emscripten-profile"
260+
CHROME_FLAGS_HEADLESS: "--headless --remote-debugging-port=1234"
261+
CHROME_FLAGS_WASM: "--enable-features=WebAssembly --enable-features=SharedArrayBuffer --disable-features=WebAssemblyTrapHandler --js-flags=\"--experimental-wasm-threads --harmony-sharedarraybuffer --no-wasm-disable-structured-cloning\""
262+
CHROME_FLAGS_NOCACHE: "--disk-cache-dir=/dev/null --disk-cache-size=1 --media-cache-size=1 --disable-application-cache --incognito"
263+
command: |
264+
export EMTEST_BROWSER="/usr/bin/google-chrome $CHROME_FLAGS_BASE $CHROME_FLAGS_HEADLESS $CHROME_FLAGS_WASM $CHROME_FLAGS_NOCACHE"
265+
python tests/runner.py sockets
240266
241267
jobs:
242268
build:
@@ -308,6 +334,10 @@ jobs:
308334
executor: bionic
309335
steps:
310336
- test-chrome
337+
test-sockets-chrome:
338+
executor: bionic
339+
steps:
340+
- test-sockets-chrome
311341
test-ab:
312342
executor: bionic
313343
steps:
@@ -475,6 +505,9 @@ workflows:
475505
- test-browser-chrome:
476506
requires:
477507
- build
508+
- test-sockets-chrome:
509+
requires:
510+
- build
478511
- test-ab:
479512
requires:
480513
- build

0 commit comments

Comments
 (0)