@@ -5596,23 +5596,14 @@ def test_utf8_textdecoder(self):
5596
5596
self .do_runf ('benchmark/benchmark_utf8.c' , 'OK.' )
5597
5597
5598
5598
# Test that invalid character in UTF8 does not cause decoding to crash.
5599
+ @also_with_minimal_runtime
5599
5600
@parameterized ({
5600
- '' : [[]] ,
5601
- 'textdecoder' : [[ '-sTEXTDECODER' ]] ,
5601
+ '' : ([],) ,
5602
+ 'textdecoder' : ([ '-sTEXTDECODER' ],) ,
5602
5603
})
5603
5604
def test_utf8_invalid (self , args ):
5604
5605
self .do_runf ('test_utf8_invalid.c' , 'OK.' , emcc_args = args )
5605
5606
5606
- # Test that invalid character in UTF8 does not cause decoding to crash.
5607
- @parameterized ({
5608
- '' : [[]],
5609
- 'textdecoder' : [['-sTEXTDECODER' ]],
5610
- })
5611
- def test_minimal_runtime_utf8_invalid (self , args ):
5612
- self .set_setting ('MINIMAL_RUNTIME' )
5613
- self .emcc_args += ['--pre-js' , test_file ('minimal_runtime_exit_handling.js' )]
5614
- self .do_runf ('test_utf8_invalid.c' , 'OK.' , emcc_args = args )
5615
-
5616
5607
def test_utf16_textdecoder (self ):
5617
5608
self .emcc_args += ['--embed-file' , test_file ('utf16_corpus.txt' ) + '@/utf16_corpus.txt' ]
5618
5609
self .do_runf ('benchmark/benchmark_utf16.cpp' , 'OK.' )
@@ -6929,34 +6920,29 @@ def test_EXPORTED_RUNTIME_METHODS(self):
6929
6920
self .set_setting ('EXPORTED_RUNTIME_METHODS' , ['dynCall' , 'addFunction' , 'lengthBytesUTF8' , 'getTempRet0' , 'setTempRet0' ])
6930
6921
self .do_core_test ('EXPORTED_RUNTIME_METHODS.c' )
6931
6922
6932
- @parameterized ({
6933
- '' : [],
6934
- 'minimal_runtime' : ['-sMINIMAL_RUNTIME=1' ]
6935
- })
6936
- def test_dyncall_specific (self , * args ):
6923
+ @also_with_minimal_runtime
6924
+ def test_dyncall_specific (self ):
6937
6925
if self .get_setting ('MEMORY64' ):
6938
6926
self .skipTest ('not compatible with MEMORY64' )
6939
6927
if self .get_setting ('WASM_BIGINT' ) != 0 and not self .is_wasm2js ():
6940
6928
# define DYNCALLS because this test does test calling them directly, and
6941
6929
# in WASM_BIGINT mode we do not enable them by default (since we can do
6942
6930
# more without them - we don't need to legalize)
6943
- args = list ( args ) + ['-sDYNCALLS' , '-DWASM_BIGINT' ]
6931
+ self . emcc_args += ['-sDYNCALLS' , '-DWASM_BIGINT' ]
6944
6932
cases = [
6945
6933
('DIRECT' , []),
6946
6934
('DYNAMIC_SIG' , ['-sDYNCALLS' ]),
6947
6935
]
6948
- if '-sMINIMAL_RUNTIME=1' in args :
6949
- self .emcc_args += ['--pre-js' , test_file ('minimal_runtime_exit_handling.js' )]
6950
- else :
6936
+ if self .get_setting ('MINIMAL_RUNTIME' ) == 0 :
6951
6937
cases += [
6952
6938
('EXPORTED' , []),
6953
6939
('EXPORTED_DYNAMIC_SIG' , ['-sDYNCALLS' , '-sEXPORTED_RUNTIME_METHODS=dynCall' ]),
6954
6940
('FROM_OUTSIDE' , ['-sEXPORTED_RUNTIME_METHODS=dynCall_iiji' ])
6955
6941
]
6956
6942
6957
6943
for which , extra_args in cases :
6958
- print (str (args ) + ' ' + which )
6959
- self .do_core_test ('test_dyncall_specific.c' , emcc_args = ['-D' + which ] + list ( args ) + extra_args )
6944
+ print (str (extra_args ) + ' ' + which )
6945
+ self .do_core_test ('test_dyncall_specific.c' , emcc_args = ['-D' + which ] + extra_args )
6960
6946
6961
6947
@parameterized ({
6962
6948
'' : ([],),
@@ -8600,6 +8586,7 @@ def test_postrun_exit_runtime(self):
8600
8586
self .do_runf ('hello_world.c' , 'post run' )
8601
8587
8602
8588
# Tests that building with -sDECLARE_ASM_MODULE_EXPORTS=0 works
8589
+ @also_with_minimal_runtime
8603
8590
def test_no_declare_asm_module_exports (self ):
8604
8591
self .set_setting ('DECLARE_ASM_MODULE_EXPORTS' , 0 )
8605
8592
self .set_setting ('WASM_ASYNC_COMPILATION' , 0 )
@@ -8617,16 +8604,6 @@ def test_no_declare_asm_module_exports(self):
8617
8604
else :
8618
8605
print (occurances )
8619
8606
8620
- # Tests that building with -sDECLARE_ASM_MODULE_EXPORTS=0 works
8621
- @no_wasmfs ('https://github.com/emscripten-core/emscripten/issues/16816' )
8622
- def test_minimal_runtime_no_declare_asm_module_exports (self ):
8623
- self .set_setting ('DECLARE_ASM_MODULE_EXPORTS' , 0 )
8624
- self .set_setting ('WASM_ASYNC_COMPILATION' , 0 )
8625
- self .maybe_closure ()
8626
- self .set_setting ('MINIMAL_RUNTIME' )
8627
- self .emcc_args += ['--pre-js' , test_file ('minimal_runtime_exit_handling.js' )]
8628
- self .do_runf ('declare_asm_module_exports.c' , 'jsFunction: 1' )
8629
-
8630
8607
# Tests that -sMINIMAL_RUNTIME works well in different build modes
8631
8608
@no_wasmfs ('https://github.com/emscripten-core/emscripten/issues/16816' )
8632
8609
@parameterized ({
@@ -9354,19 +9331,12 @@ def test_Module_dynamicLibraries(self, args):
9354
9331
force_c = True )
9355
9332
9356
9333
# Tests the emscripten_get_exported_function() API.
9334
+ @also_with_minimal_runtime
9357
9335
def test_get_exported_function (self ):
9358
9336
self .set_setting ('ALLOW_TABLE_GROWTH' )
9359
9337
self .emcc_args += ['-lexports.js' ]
9360
9338
self .do_core_test ('test_get_exported_function.cpp' )
9361
9339
9362
- # Tests the emscripten_get_exported_function() API.
9363
- def test_minimal_runtime_get_exported_function (self ):
9364
- self .set_setting ('ALLOW_TABLE_GROWTH' )
9365
- self .set_setting ('MINIMAL_RUNTIME' )
9366
- self .emcc_args += ['--pre-js' , test_file ('minimal_runtime_exit_handling.js' )]
9367
- self .emcc_args += ['-lexports.js' ]
9368
- self .do_core_test ('test_get_exported_function.cpp' )
9369
-
9370
9340
# Marked as impure since the WASI reactor modules (modules without main)
9371
9341
# are not yet suppored by the wasm engines we test against.
9372
9342
@also_with_standalone_wasm (impure = True )
0 commit comments