@@ -356,7 +356,14 @@ def decorator(f):
356356
357357 @wraps (f )
358358 def decorated (self , * args , ** kwargs ):
359- if (name + '=1' ) in self .cflags or self .get_setting (name ):
359+ if '=' in name :
360+ key , val = name .split ('=' , 1 )
361+ else :
362+ key = name
363+ val = 1
364+ if int (val ) == 1 and f'-s{ key } ' in self .cflags :
365+ self .skipTest (note )
366+ if f'-s{ key } ={ val } ' in self .cflags or self .get_setting (key ) == int (val ):
360367 self .skipTest (note )
361368 f (self , * args , ** kwargs )
362369 return decorated
@@ -382,6 +389,7 @@ def decorated(self, textdecoder, *args, **kwargs):
382389no_strict = make_no_decorator_for_setting ('STRICT' )
383390no_strict_js = make_no_decorator_for_setting ('STRICT_JS' )
384391no_big_endian = make_no_decorator_for_setting ('SUPPORT_BIG_ENDIAN' )
392+ no_omit_asm_module_exports = make_no_decorator_for_setting ('DECLARE_ASM_MODULE_EXPORTS=0' )
385393
386394
387395def is_sanitizing (args ):
@@ -6355,6 +6363,7 @@ def test_jslib(self):
63556363 @crossplatform
63566364 @no_modularize_instance ('uses MODULARIZE' )
63576365 @no_strict_js ('MODULARIZE is not compatible with STRICT_JS' )
6366+ @no_omit_asm_module_exports ('MODULARIZE is not compatible with DECLARE_ASM_MODULE_EXPORTS=0' )
63586367 def test_unicode_js_library (self ):
63596368 # First verify that we have correct overridden the default python file encoding.
63606369 # The follow program should fail, assuming the above LC_CTYPE + PYTHONUTF8
@@ -7315,7 +7324,6 @@ def test_large_exported_response(self):
73157324
73167325 self .set_setting ('EXPORTED_FUNCTIONS' , '@large_exported_response.json' )
73177326 self .do_run (src , 'waka 4999!' )
7318- self .assertContained ('_exported_func_from_response_file_1' , read_file ('src.js' ))
73197327
73207328 def test_emulate_function_pointer_casts (self ):
73217329 # Forcibly disable EXIT_RUNTIME due to:
@@ -8064,6 +8072,7 @@ def get_wat_addr(call_index):
80648072 self .assertLessEqual (start_wat_addr , dwarf_addr )
80658073 self .assertLessEqual (dwarf_addr , end_wat_addr )
80668074
8075+ @no_omit_asm_module_exports ('MODULARIZE is not compatible with DECLARE_ASM_MODULE_EXPORTS=0' )
80678076 @no_modularize_instance ('uses -sMODULARIZE' )
80688077 @no_strict_js ('MODULARIZE is not compatible with STRICT_JS' )
80698078 def test_modularize_closure_pre (self ):
@@ -8631,7 +8640,7 @@ def test_memprof_requirements(self):
86318640 if (typeof _emscripten_stack_get_base === 'function' &&
86328641 typeof _emscripten_stack_get_end === 'function' &&
86338642 typeof _emscripten_stack_get_current === 'function' &&
8634- typeof Module['___heap_base'] === 'number' ) {
8643+ Module['___heap_base'] > 0 ) {
86358644 out('able to run memprof');
86368645 return 0;
86378646 } else {
@@ -9121,6 +9130,7 @@ def test_asan_api(self):
91219130
91229131 @asan
91239132 @no_strict_js ('MODULARIZE is not compatible with STRICT_JS' )
9133+ @no_omit_asm_module_exports ('MODULARIZE is not compatible with DECLARE_ASM_MODULE_EXPORTS=0' )
91249134 def test_asan_modularized_with_closure (self ):
91259135 # the bug is that createModule() returns undefined, instead of the
91269136 # proper Promise object.
@@ -9780,6 +9790,7 @@ def test_esm_integration(self):
97809790 self .assertContained ('hello, world! (3)' , self .run_js ('runner.mjs' ))
97819791 self .assertFileContents (test_file ('core/test_esm_integration.expected.mjs' ), read_file ('hello_world.mjs' ))
97829792
9793+ @no_omit_asm_module_exports ('MODULARIZE is not compatible with DECLARE_ASM_MODULE_EXPORTS=0' )
97839794 @no_strict_js ('MODULARIZE is not compatible with STRICT_JS' )
97849795 def test_modularize_instance_hello (self ):
97859796 self .do_core_test ('test_hello_world.c' , cflags = ['-sMODULARIZE=instance' , '-Wno-experimental' ])
@@ -9788,6 +9799,7 @@ def test_modularize_instance_hello(self):
97889799 '' : ([],),
97899800 'pthreads' : (['-pthread' ],),
97909801 })
9802+ @no_omit_asm_module_exports ('MODULARIZE is not compatible with DECLARE_ASM_MODULE_EXPORTS=0' )
97919803 @no_strict_js ('MODULARIZE is not compatible with STRICT_JS' )
97929804 def test_modularize_instance (self , args ):
97939805 if args :
@@ -9822,6 +9834,7 @@ def test_modularize_instance(self, args):
98229834
98239835 self .assertContained ('main1\n main2\n foo\n bar\n baz\n ' , self .run_js ('runner.mjs' ))
98249836
9837+ @no_omit_asm_module_exports ('MODULARIZE is not compatible with DECLARE_ASM_MODULE_EXPORTS=0' )
98259838 @no_4gb ('EMBIND_AOT can\' t lower 4gb' )
98269839 @no_strict_js ('MODULARIZE is not compatible with STRICT_JS' )
98279840 def test_modularize_instance_embind (self ):
@@ -10037,5 +10050,7 @@ def setUp(self):
1003710050# runs all unit tests via qemu on the s390x big endian version of Node.js.
1003810051bigendian0 = make_run ('bigendian0' , cflags = ['-O0' , '-Wno-experimental' ], settings = {'SUPPORT_BIG_ENDIAN' : 1 })
1003910052
10053+ omitexports0 = make_run ('omitexports0' , cflags = ['-O0' ], settings = {'DECLARE_ASM_MODULE_EXPORTS' : 0 })
10054+
1004010055# TestCoreBase is just a shape for the specific subclasses, we don't test it itself
1004110056del TestCoreBase # noqa
0 commit comments