Skip to content

Commit 4f33bfe

Browse files
authored
Add minimal wasm64 testing to CI. NFC (#15595)
This should be enough to prevent the most basic regressions.
1 parent 23e87e4 commit 4f33bfe

File tree

2 files changed

+29
-17
lines changed

2 files changed

+29
-17
lines changed

.circleci/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,11 @@ jobs:
385385
steps:
386386
- run-tests:
387387
test_targets: "wasm2js1"
388+
test-wasm64:
389+
executor: bionic
390+
steps:
391+
- run-tests:
392+
test_targets: "wasm64.test_hello_world"
388393
test-other:
389394
executor: bionic
390395
steps:
@@ -476,6 +481,9 @@ workflows:
476481
- test-wasm3:
477482
requires:
478483
- build-linux
484+
- test-wasm64:
485+
requires:
486+
- build-linux
479487
- test-wasm2js1:
480488
requires:
481489
- build-linux

tests/test_core.py

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ def can_do_standalone(self):
181181
self.get_setting('STACK_OVERFLOW_CHECK', 0) < 2 and \
182182
not self.get_setting('MINIMAL_RUNTIME') and \
183183
not self.get_setting('SAFE_HEAP') and \
184+
not self.get_setting('MEMORY64') and \
184185
'-fsanitize=address' not in self.emcc_args
185186

186187

@@ -190,6 +191,8 @@ def decorated(self):
190191
print('wasmfs')
191192
if self.get_setting('STANDALONE_WASM'):
192193
self.skipTest("test currently cannot run both with WASMFS and STANDALONE_WASM")
194+
if self.get_setting('MEMORY64'):
195+
self.skipTest("test currently cannot run both with WASMFS and WASMFS")
193196
self.set_setting('WASMFS')
194197
self.emcc_args = self.emcc_args.copy() + ['-DWASMFS']
195198
func(self)
@@ -204,24 +207,25 @@ def metafunc(self, standalone):
204207
if not standalone:
205208
func(self)
206209
else:
207-
if can_do_standalone(self):
208-
self.set_setting('STANDALONE_WASM')
209-
# we will not legalize the JS ffi interface, so we must use BigInt
210-
# support in order for JS to have a chance to run this without trapping
211-
# when it sees an i64 on the ffi.
212-
self.set_setting('WASM_BIGINT')
213-
self.emcc_args.append('-Wno-unused-command-line-argument')
214-
# if we are impure, disallow all wasm engines
215-
if impure:
216-
self.wasm_engines = []
217-
self.js_engines = [config.NODE_JS]
218-
self.node_args.append('--experimental-wasm-bigint')
210+
if not can_do_standalone(self):
211+
self.skipTest('Test configuration is not compatible with STANDALONE_WASM')
212+
self.set_setting('STANDALONE_WASM')
213+
# we will not legalize the JS ffi interface, so we must use BigInt
214+
# support in order for JS to have a chance to run this without trapping
215+
# when it sees an i64 on the ffi.
216+
self.set_setting('WASM_BIGINT')
217+
self.emcc_args.append('-Wno-unused-command-line-argument')
218+
# if we are impure, disallow all wasm engines
219+
if impure:
220+
self.wasm_engines = []
221+
self.js_engines = [config.NODE_JS]
222+
self.node_args.append('--experimental-wasm-bigint')
223+
func(self)
224+
if wasm2c:
225+
print('wasm2c')
226+
self.set_setting('WASM2C')
227+
self.wasm_engines = []
219228
func(self)
220-
if wasm2c:
221-
print('wasm2c')
222-
self.set_setting('WASM2C')
223-
self.wasm_engines = []
224-
func(self)
225229

226230
metafunc._parameterize = {'': (False,),
227231
'standalone': (True,)}

0 commit comments

Comments
 (0)