Skip to content

Commit c603839

Browse files
authored
[memory64] Run hello world test with MEMORY64=1 and MEMORY64=2 (#16508)
Up until now we have not run any tests at all under MEMORY64=1. I called the MEMORY64=2 test suite `wasm64l` for "wam64-lowered". See: #4532
1 parent 7f5c40b commit c603839

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ jobs:
374374
executor: bionic
375375
steps:
376376
- run-tests-linux:
377-
test_targets: "wasm64.test_hello_world"
377+
test_targets: "wasm64.test_hello_world wasm64l.test_hello_world"
378378
test-other:
379379
executor: bionic
380380
steps:

tests/runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def replace_legacy_suite_names(args):
236236
newargs = []
237237

238238
for a in args:
239-
if a.startswith('wasm') and not a.startswith('wasm2js') and not a.startswith('wasmfs'):
239+
if a.startswith('wasm') and not any(a.startswith(p) for p in ('wasm2js', 'wasmfs', 'wasm64')):
240240
print('warning: test suites in test_core.py have been renamed from `wasm` to `core`. Please use the new names')
241241
a = a.replace('wasm', 'core', 1)
242242
newargs.append(a)

tests/test_core.py

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9088,7 +9088,7 @@ def test_syscall_intercept(self):
90889088

90899089

90909090
# Generate tests for everything
9091-
def make_run(name, emcc_args, settings=None, env=None, node_args=None):
9091+
def make_run(name, emcc_args, settings=None, env=None, node_args=None, require_v8=False, v8_args=None):
90929092
if env is None:
90939093
env = {}
90949094
if settings is None:
@@ -9107,9 +9107,6 @@ def tearDown(self):
91079107
for k, v in self.env.items():
91089108
del os.environ[k]
91099109

9110-
if node_args:
9111-
self.node_args = TT.original
9112-
91139110
TT.tearDown = tearDown
91149111

91159112
def setUp(self):
@@ -9126,8 +9123,13 @@ def setUp(self):
91269123
self.emcc_args += emcc_args
91279124

91289125
if node_args:
9129-
TT.original = self.node_args
9130-
self.node_args.append(node_args)
9126+
self.node_args += node_args
9127+
9128+
if v8_args:
9129+
self.v8_args += v8_args
9130+
9131+
if require_v8:
9132+
self.require_v8()
91319133

91329134
TT.setUp = setUp
91339135

@@ -9143,8 +9145,13 @@ def setUp(self):
91439145
core3 = make_run('core3', emcc_args=['-O3'])
91449146
cores = make_run('cores', emcc_args=['-Os'])
91459147
corez = make_run('corez', emcc_args=['-Oz'])
9146-
core64 = make_run('core64', emcc_args=['-O0', '-g3'],
9147-
settings={'MEMORY64': 2}, env=None, node_args='--experimental-wasm-bigint')
9148+
9149+
# MEMORY64=1
9150+
wasm64 = make_run('wasm64', emcc_args=[], settings={'MEMORY64': 1},
9151+
require_v8=True, v8_args=['--experimental-wasm-memory64'])
9152+
# MEMORY64=2, or "lowered"
9153+
wasm64l = make_run('wasm64', emcc_args=[], settings={'MEMORY64': 2},
9154+
node_args=['--experimental-wasm-bigint'])
91489155

91499156
lto0 = make_run('lto0', emcc_args=['-flto', '-O0'])
91509157
lto1 = make_run('lto1', emcc_args=['-flto', '-O1'])

0 commit comments

Comments
 (0)