Skip to content

Commit f47a884

Browse files
committed
[test] Use is_wasm64 helper method. NFC
1 parent c45b4cc commit f47a884

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

test/decorators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ def can_do_standalone(self, impure=False):
460460
# Pure standalone engines don't support MEMORY64 yet. Even with MEMORY64=2 (lowered)
461461
# the WASI APIs that take pointer values don't have 64-bit variants yet.
462462
if not impure:
463-
if self.get_setting('MEMORY64'):
463+
if self.is_wasm64():
464464
return False
465465
# This is way to detect the core_2gb test mode in test_core.py
466466
if self.get_setting('INITIAL_MEMORY') == '2200mb':

test/test_core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5325,7 +5325,7 @@ def test_strtok(self):
53255325
self.do_core_test('test_strtok.c')
53265326

53275327
def test_strtol(self):
5328-
if self.get_setting('MEMORY64'):
5328+
if self.is_wasm64():
53295329
out_suffix = '64'
53305330
else:
53315331
out_suffix = ''
@@ -6962,7 +6962,7 @@ def line_splitter(data):
69626962
# and this test would different non-deterministic results based on, for example,
69636963
# what other tests had previously run.
69646964
builder_cmd = [EMBUILDER, 'build', 'libpng']
6965-
if self.get_setting('MEMORY64'):
6965+
if self.is_wasm64():
69666966
builder_cmd.append('--wasm64')
69676967
self.cflags.append('-Wno-pointer-to-int-cast')
69686968
self.run_process(builder_cmd)
@@ -7726,7 +7726,7 @@ def test_embind_i64_val(self, safe_heap):
77267726
if safe_heap and '-fsanitize=address' in self.cflags:
77277727
self.skipTest('asan does not work with SAFE_HEAP')
77287728
self.set_setting('SAFE_HEAP', safe_heap)
7729-
out_suffix = '64' if self.get_setting('MEMORY64') else ''
7729+
out_suffix = '64' if self.is_wasm64() else ''
77307730
self.do_run_in_out_file_test('embind/test_i64_val.cpp', assert_identical=True, out_suffix=out_suffix, cflags=['-lembind'])
77317731

77327732
@no_wasm2js('wasm_bigint')

test/test_other.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9210,7 +9210,7 @@ def test_closure_full_js_library(self, args):
92109210

92119211
@also_with_wasm64
92129212
def test_closure_webgpu(self):
9213-
if config.FROZEN_CACHE and self.get_setting('MEMORY64'):
9213+
if config.FROZEN_CACHE and self.is_wasm64():
92149214
# CI configuration doesn't run `embuilder` with wasm64 on ports
92159215
self.skipTest("test doesn't work with frozen cache")
92169216
# Emdawnwebgpu uses C++ internally, so we use a cpp file here so emcc defaults to linking C++.
@@ -11920,7 +11920,7 @@ def test_standalone_syscalls(self):
1192011920
'dylink': (['-sMAIN_MODULE=2'],),
1192111921
})
1192211922
def test_emdawnwebgpu_link_test(self, args):
11923-
if config.FROZEN_CACHE and (self.get_setting('MEMORY64') or '-sMAIN_MODULE=2' in args):
11923+
if config.FROZEN_CACHE and (self.is_wasm64() or '-sMAIN_MODULE=2' in args):
1192411924
# CI configuration doesn't run `embuilder` with wasm64 on ports
1192511925
self.skipTest("test doesn't work with frozen cache")
1192611926
self.emcc(test_file('test_emdawnwebgpu_link_test.cpp'), ['--use-port=emdawnwebgpu', '-sASYNCIFY'] + args)
@@ -12466,7 +12466,7 @@ def test_split_module(self, customLoader, jspi, opt):
1246612466
wasm_split_run = [wasm_split, '-g',
1246712467
'--enable-mutable-globals', '--enable-bulk-memory', '--enable-nontrapping-float-to-int',
1246812468
'--export-prefix=%', 'test_split_module.wasm.orig', '-o1', 'primary.wasm', '-o2', 'secondary.wasm', '--profile=profile.data']
12469-
if self.get_setting('MEMORY64'):
12469+
if self.is_wasm64():
1247012470
wasm_split_run += ['--enable-memory64']
1247112471
self.run_process(wasm_split_run)
1247212472

0 commit comments

Comments
 (0)