@@ -47,8 +47,15 @@ commands:
47
47
- run : npm ci
48
48
pip-install :
49
49
description : " pip install"
50
+ parameters :
51
+ python :
52
+ description : " Python executable to use"
53
+ type : string
54
+ default : python3
50
55
steps :
51
- - run : pip3 install -r requirements-dev.txt
56
+ - run :
57
+ name : pip install
58
+ command : << parameters.python >> -m pip install -r requirements-dev.txt
52
59
build :
53
60
description : " Install emsdk"
54
61
steps :
@@ -93,6 +100,7 @@ commands:
93
100
build-libs-and-freeze :
94
101
description : " Build all libraries, and freeze the cache"
95
102
steps :
103
+ - pip-install
96
104
- run :
97
105
name : embuilder build ALL
98
106
command : |
@@ -134,12 +142,8 @@ commands:
134
142
- vms/
135
143
- wasi-sdk/
136
144
- .jsvu/
137
- run-tests :
138
- description : " Runs emscripten tests"
139
- parameters :
140
- test_targets :
141
- description : " Test suites to run"
142
- type : string
145
+ prepare-for-tests :
146
+ description : " Setup emscripten tests"
143
147
steps :
144
148
- attach_workspace :
145
149
# Must be absolute path or relative path from working_directory
@@ -150,49 +154,33 @@ commands:
150
154
command : git submodule update --init
151
155
- emsdk-env
152
156
- npm-install
153
- - run :
154
- name : run tests
155
- command : |
156
- ./tests/runner << parameters.test_targets >>
157
- $EMSDK_PYTHON ./tools/check_clean.py
158
- run-tests-mac :
157
+ - pip-install
158
+ run-tests :
159
159
description : " Runs emscripten tests"
160
160
parameters :
161
161
test_targets :
162
162
description : " Test suites to run"
163
163
type : string
164
164
steps :
165
- - attach_workspace :
166
- # Must be absolute path or relative path from working_directory
167
- at : ~/
168
- - checkout
169
- - emsdk-env
170
- - npm-install
171
- - run :
172
- name : Install brew package dependencies
173
- environment :
174
- HOMEBREW_NO_AUTO_UPDATE : " 1"
175
- command : |
176
- brew list cmake || brew install cmake
177
- brew list python3 || brew install python3
178
165
- run :
179
166
name : run tests
180
167
command : |
181
168
./tests/runner << parameters.test_targets >>
182
169
$EMSDK_PYTHON ./tools/check_clean.py
170
+ run-tests-linux :
171
+ description : " Runs emscripten tests"
172
+ parameters :
173
+ test_targets :
174
+ description : " Test suites to run"
175
+ type : string
176
+ steps :
177
+ - prepare-for-tests
178
+ - run-tests :
179
+ test_targets : << parameters.test_targets >>
183
180
test-firefox :
184
181
description : " Runs emscripten tests under firefox"
185
182
steps :
186
- - attach_workspace :
187
- # Must be absolute path or relative path from working_directory
188
- at : ~/
189
- - checkout
190
- - run :
191
- name : submodule update
192
- command : git submodule update --init
193
- - emsdk-env
194
- - npm-install
195
- - pip-install
183
+ - prepare-for-tests
196
184
- run :
197
185
name : download firefox
198
186
command : |
@@ -242,16 +230,7 @@ commands:
242
230
test-chrome :
243
231
description : " Runs emscripten browser tests under chrome"
244
232
steps :
245
- - attach_workspace :
246
- # Must be absolute path or relative path from working_directory
247
- at : ~/
248
- - checkout
249
- - run :
250
- name : submodule update
251
- command : git submodule update --init
252
- - emsdk-env
253
- - npm-install
254
- - pip-install
233
+ - prepare-for-tests
255
234
- download-chrome
256
235
- run :
257
236
name : run tests
@@ -274,13 +253,7 @@ commands:
274
253
test-sockets-chrome :
275
254
description : " Runs emscripten sockets tests under chrome"
276
255
steps :
277
- - attach_workspace :
278
- # Must be absolute path or relative path from working_directory
279
- at : ~/
280
- - checkout
281
- - emsdk-env
282
- - npm-install
283
- - pip-install
256
+ - prepare-for-tests
284
257
- download-chrome
285
258
- run :
286
259
name : run sockets tests
@@ -321,7 +294,7 @@ jobs:
321
294
test-sanity :
322
295
executor : bionic
323
296
steps :
324
- - run-tests :
297
+ - run-tests-linux :
325
298
test_targets : " sanity"
326
299
build-linux :
327
300
executor : bionic
@@ -366,7 +339,7 @@ jobs:
366
339
test-posixtest :
367
340
executor : bionic
368
341
steps :
369
- - run-tests :
342
+ - run-tests-linux :
370
343
test_targets : " posixtest"
371
344
test-core0 :
372
345
executor : bionic
@@ -375,37 +348,37 @@ jobs:
375
348
environment :
376
349
EMCC_READ_METADATA : " compare"
377
350
steps :
378
- - run-tests :
351
+ - run-tests-linux :
379
352
test_targets : " core0"
380
353
test-core2 :
381
354
executor : bionic
382
355
environment :
383
356
EMTEST_BROWSER : " node"
384
357
steps :
385
- - run-tests :
358
+ - run-tests-linux :
386
359
# also add a few asan tests and a single test of EMTEST_BROWSER=node
387
360
test_targets : " core2 asan.test_stat asan.test_float_builtins asan.test_embind* asan.test_abort_on_exceptions asan.test_ubsan_full_left_shift_fsanitize_integer asan.test_pthread* asan.test_dyncall_specific_minimal_runtime asan.test_async_hello lsan.test_stdio_locking lsan.test_pthread_create browser.test_pthread_join"
388
361
test-core3 :
389
362
executor : bionic
390
363
steps :
391
- - run-tests :
364
+ - run-tests-linux :
392
365
# also add a little select testing for wasm2js in -O3
393
366
# also add a little select wasmfs testing
394
367
test_targets : " core3 wasm2js3.test_memorygrowth_2 wasmfs.test_hello_world wasmfs.test_hello_world_standalone wasmfs.test_unistd_links* wasmfs.test_atexit_standalone wasmfs.test_emscripten_get_now wasmfs.test_dyncall_specific_minimal_runtime core2ss.test_pthread_dylink wasmfs.test_utime wasmfs.test_unistd_unlink wasmfs.test_unistd_access wasmfs.test_unistd_close wasmfs.test_unistd_truncate wasmfs.test_readdir wasmfs.test_unistd_pipe"
395
368
test-wasm2js1 :
396
369
executor : bionic
397
370
steps :
398
- - run-tests :
371
+ - run-tests-linux :
399
372
test_targets : " wasm2js1"
400
373
test-wasm64 :
401
374
executor : bionic
402
375
steps :
403
- - run-tests :
376
+ - run-tests-linux :
404
377
test_targets : " wasm64.test_hello_world"
405
378
test-other :
406
379
executor : bionic
407
380
steps :
408
- - run-tests :
381
+ - run-tests-linux :
409
382
# some native-dependent tests fail because of the lack of native
410
383
# headers on emsdk-bundled clang
411
384
test_targets : " other skip:other.test_native_link_error_message"
@@ -468,8 +441,10 @@ jobs:
468
441
- build
469
442
# note we do *not* build all libraries and freeze the cache; as we run
470
443
# only limited tests here, it's more efficient to build on demand
471
- - run-tests-mac :
472
- test_targets : " other core0.test_lua core0.test_longjmp_standalone core2.test_sse1 skip:other.test_native_link_error_message"
444
+ - pip-install :
445
+ python : " $EMSDK_PYTHON"
446
+ - run-tests :
447
+ test_targets : " other sockets.test_nodejs_sockets_echo core0.test_lua core0.test_longjmp_standalone core2.test_sse1 skip:other.test_native_link_error_message"
473
448
474
449
workflows :
475
450
build-test :
0 commit comments