Skip to content

Commit c873744

Browse files
authored
[test] Use is_wasm64 helper method. NFC (#26961)
1 parent 8c75467 commit c873744

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
@@ -5324,7 +5324,7 @@ def test_strtok(self):
53245324
self.do_core_test('test_strtok.c')
53255325

53265326
def test_strtol(self):
5327-
if self.get_setting('MEMORY64'):
5327+
if self.is_wasm64():
53285328
out_suffix = '64'
53295329
else:
53305330
out_suffix = ''
@@ -6961,7 +6961,7 @@ def line_splitter(data):
69616961
# and this test would different non-deterministic results based on, for example,
69626962
# what other tests had previously run.
69636963
builder_cmd = [EMBUILDER, 'build', 'libpng']
6964-
if self.get_setting('MEMORY64'):
6964+
if self.is_wasm64():
69656965
builder_cmd.append('--wasm64')
69666966
self.cflags.append('-Wno-pointer-to-int-cast')
69676967
self.run_process(builder_cmd)
@@ -7725,7 +7725,7 @@ def test_embind_i64_val(self, safe_heap):
77257725
if safe_heap and '-fsanitize=address' in self.cflags:
77267726
self.skipTest('asan does not work with SAFE_HEAP')
77277727
self.set_setting('SAFE_HEAP', safe_heap)
7728-
out_suffix = '64' if self.get_setting('MEMORY64') else ''
7728+
out_suffix = '64' if self.is_wasm64() else ''
77297729
self.do_run_in_out_file_test('embind/test_i64_val.cpp', assert_identical=True, out_suffix=out_suffix, cflags=['-lembind'])
77307730

77317731
@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)