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