Skip to content

Commit 1b0e585

Browse files
authored
[test] Make use of @also_with_minimal_runtime. NFC (emscripten-core#24319)
1 parent 1abf03c commit 1b0e585

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

test/test_core.py

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5818,11 +5818,8 @@ def test_fs_mmap(self):
58185818
self.do_run_in_out_file_test('fs/test_mmap.c')
58195819

58205820
@no_wasmfs('wasmfs will (?) need a non-JS mechanism to ignore permissions during startup')
5821-
@parameterized({
5822-
'': [],
5823-
'minimal_runtime': ['-sMINIMAL_RUNTIME=1'],
5824-
})
5825-
def test_fs_no_main(self, *args):
5821+
@also_with_minimal_runtime
5822+
def test_fs_no_main(self):
58265823
# library_fs.js uses hooks to enable ignoring of permisions up until ATMAINs are run. This
58275824
# test verified that they work correctly, even in programs without a main function.
58285825
create_file('pre.js', '''
@@ -5836,7 +5833,7 @@ def test_fs_no_main(self, *args):
58365833
''')
58375834
self.set_setting('EXPORTED_FUNCTIONS', '_foo')
58385835
self.set_setting('FORCE_FILESYSTEM')
5839-
self.emcc_args += ['--pre-js', 'pre.js'] + list(args)
5836+
self.emcc_args += ['--pre-js', 'pre.js']
58405837
self.do_run('int foo() { return 42; }', '', force_c=True)
58415838

58425839
@also_with_noderawfs
@@ -7658,17 +7655,12 @@ def test_embind_sync_if_pthread_delayed(self):
76587655
### Tests for tools
76597656

76607657
@no_wasm2js('TODO: source maps in wasm2js')
7661-
@parameterized({
7662-
'': ([],),
7663-
'minimal_runtime': (['-sMINIMAL_RUNTIME'],),
7664-
})
7658+
@also_with_minimal_runtime
76657659
@requires_node
7666-
def test_source_map(self, args):
7660+
def test_source_map(self):
76677661
if '-g' not in self.emcc_args:
76687662
self.emcc_args.append('-g')
76697663

7670-
self.emcc_args += args
7671-
76727664
src = '''
76737665
#include <stdio.h>
76747666
#include <assert.h>
@@ -8419,16 +8411,12 @@ def test_maybe_wasm2js(self):
84198411

84208412
@no_asan('no wasm2js support yet in asan')
84218413
@requires_wasm2js
8422-
@parameterized({
8423-
'': ([],),
8424-
'minimal_runtime': (['-sMINIMAL_RUNTIME'],),
8425-
})
8426-
def test_wasm2js_fallback(self, args):
8414+
@also_with_minimal_runtime
8415+
def test_wasm2js_fallback(self):
84278416
if self.is_wasm2js():
84288417
self.skipTest('redundant to test wasm2js in wasm2js* mode')
84298418

8430-
cmd = [EMCC, test_file('small_hello_world.c'), '-sWASM=2'] + args
8431-
self.run_process(cmd)
8419+
self.run_process([EMCC, test_file('small_hello_world.c'), '-sWASM=2'])
84328420

84338421
# First run with WebAssembly support enabled
84348422
# Move the Wasm2js fallback away to test it is not accidentally getting loaded.

0 commit comments

Comments
 (0)