@@ -921,7 +921,7 @@ def test_emmalloc(self, *args):
921921 path_from_root ('system/lib/emmalloc.c' ),
922922 ]
923923 self .cflags += args
924- self .do_run_in_out_file_test ( 'core/ test_emmalloc.c' )
924+ self .do_core_test ( ' test_emmalloc.c' )
925925
926926 @no_asan ('ASan does not support custom memory allocators' )
927927 @no_lsan ('LSan does not support custom memory allocators' )
@@ -1122,7 +1122,7 @@ def test_setjmp_within_loop(self):
11221122 def test_exceptions (self ):
11231123 self .set_setting ('EXCEPTION_DEBUG' )
11241124 self .maybe_closure ()
1125- self .do_run_in_out_file_test ( 'core/ test_exceptions.cpp' , out_suffix = '_caught' )
1125+ self .do_core_test ( ' test_exceptions.cpp' , out_suffix = '_caught' )
11261126
11271127 @requires_wasm_eh
11281128 def test_exceptions_with_and_without_longjmp (self ):
@@ -1132,7 +1132,7 @@ def test_exceptions_with_and_without_longjmp(self):
11321132 self .set_setting ('DISABLE_EXCEPTION_CATCHING' , 0 )
11331133 for support_longjmp in (0 , 'emscripten' ):
11341134 self .set_setting ('SUPPORT_LONGJMP' , support_longjmp )
1135- self .do_run_in_out_file_test ( 'core/ test_exceptions.cpp' , out_suffix = '_caught' )
1135+ self .do_core_test ( ' test_exceptions.cpp' , out_suffix = '_caught' )
11361136 # Wasm EH with and without Wasm SjLj support
11371137 self .clear_setting ('DISABLE_EXCEPTION_CATCHING' )
11381138 if self .is_wasm2js ():
@@ -1145,7 +1145,7 @@ def test_exceptions_with_and_without_longjmp(self):
11451145 self .set_setting ('WASM_LEGACY_EXCEPTIONS' , legacy )
11461146 for support_longjmp in (0 , 'wasm' ):
11471147 self .set_setting ('SUPPORT_LONGJMP' , support_longjmp )
1148- self .do_run_in_out_file_test ( 'core/ test_exceptions.cpp' , out_suffix = '_caught' )
1148+ self .do_core_test ( ' test_exceptions.cpp' , out_suffix = '_caught' )
11491149
11501150 def test_exceptions_off (self ):
11511151 self .set_setting ('DISABLE_EXCEPTION_CATCHING' )
@@ -1163,11 +1163,11 @@ def test_exceptions_minimal_runtime(self):
11631163 self .set_setting ('SUPPORT_LONGJMP' , support_longjmp )
11641164
11651165 self .set_setting ('DISABLE_EXCEPTION_CATCHING' , 0 )
1166- self .do_run_in_out_file_test ( 'core/ test_exceptions.cpp' , out_suffix = '_caught' )
1166+ self .do_core_test ( ' test_exceptions.cpp' , out_suffix = '_caught' )
11671167
11681168 self .set_setting ('EXCEPTION_DEBUG' )
11691169 self .set_setting ('DISABLE_EXCEPTION_CATCHING' )
1170- self .do_run_in_out_file_test ( 'core/ test_exceptions.cpp' , out_suffix = '_uncaught' , assert_returncode = NON_ZERO )
1170+ self .do_core_test ( ' test_exceptions.cpp' , out_suffix = '_uncaught' , assert_returncode = NON_ZERO )
11711171
11721172 @with_all_eh_sjlj
11731173 def test_exceptions_custom (self ):
@@ -1274,21 +1274,21 @@ def test_exceptions_allowed(self):
12741274 # check that an empty allow list works properly (as in, same as exceptions disabled)
12751275
12761276 self .set_setting ('EXCEPTION_CATCHING_ALLOWED' , [])
1277- self .do_run_in_out_file_test ( 'core/ test_exceptions_allowed.cpp' , out_suffix = '_empty' , assert_returncode = NON_ZERO )
1277+ self .do_core_test ( ' test_exceptions_allowed.cpp' , out_suffix = '_empty' , assert_returncode = NON_ZERO )
12781278 empty_size = os .path .getsize (js_out )
12791279 if self .is_wasm ():
12801280 empty_size += os .path .getsize ('test_exceptions_allowed.wasm' )
12811281 shutil .copy (js_out , 'empty.js' )
12821282
12831283 self .set_setting ('EXCEPTION_CATCHING_ALLOWED' , ['fake' ])
1284- self .do_run_in_out_file_test ( 'core/ test_exceptions_allowed.cpp' , out_suffix = '_empty' , assert_returncode = NON_ZERO )
1284+ self .do_core_test ( ' test_exceptions_allowed.cpp' , out_suffix = '_empty' , assert_returncode = NON_ZERO )
12851285 fake_size = os .path .getsize (js_out )
12861286 if self .is_wasm ():
12871287 fake_size += os .path .getsize ('test_exceptions_allowed.wasm' )
12881288 shutil .copy (js_out , 'fake.js' )
12891289
12901290 self .clear_setting ('EXCEPTION_CATCHING_ALLOWED' )
1291- self .do_run_in_out_file_test ( 'core/ test_exceptions_allowed.cpp' , out_suffix = '_empty' , assert_returncode = NON_ZERO )
1291+ self .do_core_test ( ' test_exceptions_allowed.cpp' , out_suffix = '_empty' , assert_returncode = NON_ZERO )
12921292 disabled_size = os .path .getsize (js_out )
12931293 if self .is_wasm ():
12941294 disabled_size += os .path .getsize ('test_exceptions_allowed.wasm' )
@@ -7097,10 +7097,10 @@ def test(args=None, asserts=False):
70977097 if self .get_setting ('WASM_BIGINT' ):
70987098 out_suffix += '_bigint'
70997099 assert_returncode = 0 if not asserts else NON_ZERO
7100- self .do_run_in_out_file_test ( 'core/ test_getValue_setValue.cpp' ,
7101- out_suffix = out_suffix ,
7102- assert_returncode = assert_returncode ,
7103- cflags = args )
7100+ self .do_core_test ( ' test_getValue_setValue.cpp' ,
7101+ out_suffix = out_suffix ,
7102+ assert_returncode = assert_returncode ,
7103+ cflags = args )
71047104
71057105 if self .get_setting ('WASM_BIGINT' ):
71067106 self .cflags += ['-DWASM_BIGINT' ]
@@ -7774,7 +7774,7 @@ def test_embind_sync_if_pthread_delayed(self):
77747774 self .set_setting ('PTHREAD_POOL_DELAY_LOAD' , 1 )
77757775 self .set_setting ('PTHREAD_POOL_SIZE' , 1 )
77767776 self .cflags += ['-lembind' , '--post-js=' + test_file ('core/pthread/test_embind_sync_if_pthread_delayed.post.js' )]
7777- self .do_run_in_out_file_test ( 'core/ pthread/test_embind_sync_if_pthread_delayed.cpp' )
7777+ self .do_core_test ( ' pthread/test_embind_sync_if_pthread_delayed.cpp' )
77787778
77797779 ### Tests for tools
77807780
@@ -8098,13 +8098,13 @@ def test_minmax(self):
80988098 self .do_runf ('test_minmax.c' , 'NAN != NAN\n Success!' )
80998099
81008100 def test_localeconv (self ):
8101- self .do_run_in_out_file_test ( 'core/ test_localeconv.c' )
8101+ self .do_core_test ( ' test_localeconv.c' )
81028102
81038103 def test_newlocale (self ):
8104- self .do_run_in_out_file_test ( 'core/ test_newlocale.c' )
8104+ self .do_core_test ( ' test_newlocale.c' )
81058105
81068106 def test_setlocale (self ):
8107- self .do_run_in_out_file_test ( 'core/ test_setlocale.c' )
8107+ self .do_core_test ( ' test_setlocale.c' )
81088108
81098109 def test_vswprintf_utf8 (self ):
81108110 self .do_core_test ('test_vswprintf_utf8.c' )
@@ -9166,7 +9166,7 @@ def test_fpic_static(self):
91669166 def test_pthread_create (self ):
91679167 self .set_setting ('ENVIRONMENT' , 'node' )
91689168 self .set_setting ('STRICT' )
9169- self .do_run_in_out_file_test ( 'core/ pthread/create.c' )
9169+ self .do_core_test ( ' pthread/create.c' )
91709170
91719171 @flaky ('https://github.com/emscripten-core/emscripten/issues/22617' )
91729172 @node_pthreads
@@ -9212,50 +9212,50 @@ def test_pthread_create_pool(self):
92129212 # with a pool, we can synchronously depend on workers being available
92139213 self .set_setting ('PTHREAD_POOL_SIZE' , 2 )
92149214 self .cflags += ['-DALLOW_SYNC' ]
9215- self .do_run_in_out_file_test ( 'core/ pthread/create.c' )
9215+ self .do_core_test ( ' pthread/create.c' )
92169216
92179217 @node_pthreads
92189218 def test_pthread_create_proxy (self ):
92199219 # with PROXY_TO_PTHREAD, we can synchronously depend on workers being available
92209220 self .set_setting ('PROXY_TO_PTHREAD' )
92219221 self .set_setting ('EXIT_RUNTIME' )
92229222 self .cflags += ['-DALLOW_SYNC' ]
9223- self .do_run_in_out_file_test ( 'core/ pthread/create.c' )
9223+ self .do_core_test ( ' pthread/create.c' )
92249224
92259225 @node_pthreads
92269226 def test_pthread_create_embind_stack_check (self ):
92279227 # embind should work with stack overflow checks (see #12356)
92289228 self .set_setting ('STACK_OVERFLOW_CHECK' , 2 )
92299229 self .cflags += ['-lembind' ]
9230- self .do_run_in_out_file_test ( 'core/ pthread/create.c' , cflags = ['-sDEFAULT_TO_CXX' ])
9230+ self .do_core_test ( ' pthread/create.c' , cflags = ['-sDEFAULT_TO_CXX' ])
92319231
92329232 @node_pthreads
92339233 def test_pthread_exceptions (self ):
92349234 self .set_setting ('PTHREAD_POOL_SIZE' , 2 )
92359235 self .cflags += ['-fexceptions' ]
9236- self .do_run_in_out_file_test ( 'core/ pthread/exceptions.cpp' )
9236+ self .do_core_test ( ' pthread/exceptions.cpp' )
92379237
92389238 @node_pthreads
92399239 def test_pthread_exit_process (self ):
92409240 self .set_setting ('PROXY_TO_PTHREAD' )
92419241 self .set_setting ('EXIT_RUNTIME' )
92429242 self .cflags += ['-DEXIT_RUNTIME' , '--pre-js' , test_file ('core/pthread/test_pthread_exit_runtime.pre.js' ), '-sINCOMING_MODULE_JS_API=[onRuntimeInitialized, onExit]' ]
9243- self .do_run_in_out_file_test ( 'core/ pthread/test_pthread_exit_runtime.c' , assert_returncode = 42 )
9243+ self .do_core_test ( ' pthread/test_pthread_exit_runtime.c' , assert_returncode = 42 )
92449244
92459245 @node_pthreads
92469246 def test_pthread_keepalive (self ):
9247- self .do_run_in_out_file_test ( 'core/ pthread/test_pthread_keepalive.c' )
9247+ self .do_core_test ( ' pthread/test_pthread_keepalive.c' )
92489248
92499249 @node_pthreads
92509250 def test_pthread_weak_ref (self ):
9251- self .do_run_in_out_file_test ( 'core/ pthread/test_pthread_weak_ref.c' )
9251+ self .do_core_test ( ' pthread/test_pthread_weak_ref.c' )
92529252
92539253 @node_pthreads
92549254 def test_pthread_exit_main (self ):
9255- self .do_run_in_out_file_test ( 'core/ pthread/test_pthread_exit_main.c' )
9255+ self .do_core_test ( ' pthread/test_pthread_exit_main.c' )
92569256
92579257 def test_pthread_exit_main_stub (self ):
9258- self .do_run_in_out_file_test ( 'core/ pthread/test_pthread_exit_main.c' )
9258+ self .do_core_test ( ' pthread/test_pthread_exit_main.c' )
92599259
92609260 @node_pthreads
92619261 def test_pthread_unhandledrejection (self ):
@@ -9280,23 +9280,23 @@ def test_pthread_offset_converter(self):
92809280 self .do_runf ('core/test_return_address.c' , 'passed' )
92819281
92829282 def test_emscripten_atomics_stub (self ):
9283- self .do_run_in_out_file_test ( 'core/ pthread/emscripten_atomics.c' )
9283+ self .do_core_test ( ' pthread/emscripten_atomics.c' )
92849284
92859285 @node_pthreads
92869286 def test_emscripten_atomics (self ):
92879287 self .cflags .append ('-pthread' )
9288- self .do_run_in_out_file_test ( 'core/ pthread/emscripten_atomics.c' )
9288+ self .do_core_test ( ' pthread/emscripten_atomics.c' )
92899289
92909290 @node_pthreads
92919291 def test_emscripten_futexes (self ):
92929292 self .cflags .append ('-pthread' )
92939293 self .cflags += ['-Wno-nonnull' ] # This test explicitly checks behavior of passing NULL to emscripten_futex_wake().
9294- self .do_run_in_out_file_test ( 'core/ pthread/emscripten_futexes.c' )
9294+ self .do_core_test ( ' pthread/emscripten_futexes.c' )
92959295
92969296 @node_pthreads
92979297 def test_stdio_locking (self ):
92989298 self .set_setting ('PTHREAD_POOL_SIZE' , '2' )
9299- self .do_run_in_out_file_test ( 'core/ test_stdio_locking.c' )
9299+ self .do_core_test ( ' test_stdio_locking.c' )
93009300
93019301 @with_dylink_reversed
93029302 @node_pthreads
@@ -9589,7 +9589,7 @@ def test_main_module_js_symbol(self):
95899589 def test_emscripten_async_call (self ):
95909590 # Depends on `atexit`
95919591 self .set_setting ('EXIT_RUNTIME' )
9592- self .do_run_in_out_file_test ( 'core/ test_emscripten_async_call.c' )
9592+ self .do_core_test ( ' test_emscripten_async_call.c' )
95939593
95949594 @no_asan ('asyncify stack operations confuse asan' )
95959595 @no_modularize_instance ('ASYNCIFY=1 requires DYNCALLS' )
0 commit comments