@@ -921,7 +921,7 @@ def test_emmalloc(self, *args):
921
921
path_from_root ('system/lib/emmalloc.c' ),
922
922
]
923
923
self .cflags += args
924
- self .do_run_in_out_file_test ( 'core/ test_emmalloc.c' )
924
+ self .do_core_test ( ' test_emmalloc.c' )
925
925
926
926
@no_asan ('ASan does not support custom memory allocators' )
927
927
@no_lsan ('LSan does not support custom memory allocators' )
@@ -1122,7 +1122,7 @@ def test_setjmp_within_loop(self):
1122
1122
def test_exceptions (self ):
1123
1123
self .set_setting ('EXCEPTION_DEBUG' )
1124
1124
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' )
1126
1126
1127
1127
@requires_wasm_eh
1128
1128
def test_exceptions_with_and_without_longjmp (self ):
@@ -1132,7 +1132,7 @@ def test_exceptions_with_and_without_longjmp(self):
1132
1132
self .set_setting ('DISABLE_EXCEPTION_CATCHING' , 0 )
1133
1133
for support_longjmp in (0 , 'emscripten' ):
1134
1134
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' )
1136
1136
# Wasm EH with and without Wasm SjLj support
1137
1137
self .clear_setting ('DISABLE_EXCEPTION_CATCHING' )
1138
1138
if self .is_wasm2js ():
@@ -1145,7 +1145,7 @@ def test_exceptions_with_and_without_longjmp(self):
1145
1145
self .set_setting ('WASM_LEGACY_EXCEPTIONS' , legacy )
1146
1146
for support_longjmp in (0 , 'wasm' ):
1147
1147
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' )
1149
1149
1150
1150
def test_exceptions_off (self ):
1151
1151
self .set_setting ('DISABLE_EXCEPTION_CATCHING' )
@@ -1163,11 +1163,11 @@ def test_exceptions_minimal_runtime(self):
1163
1163
self .set_setting ('SUPPORT_LONGJMP' , support_longjmp )
1164
1164
1165
1165
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' )
1167
1167
1168
1168
self .set_setting ('EXCEPTION_DEBUG' )
1169
1169
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 )
1171
1171
1172
1172
@with_all_eh_sjlj
1173
1173
def test_exceptions_custom (self ):
@@ -1274,21 +1274,21 @@ def test_exceptions_allowed(self):
1274
1274
# check that an empty allow list works properly (as in, same as exceptions disabled)
1275
1275
1276
1276
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 )
1278
1278
empty_size = os .path .getsize (js_out )
1279
1279
if self .is_wasm ():
1280
1280
empty_size += os .path .getsize ('test_exceptions_allowed.wasm' )
1281
1281
shutil .copy (js_out , 'empty.js' )
1282
1282
1283
1283
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 )
1285
1285
fake_size = os .path .getsize (js_out )
1286
1286
if self .is_wasm ():
1287
1287
fake_size += os .path .getsize ('test_exceptions_allowed.wasm' )
1288
1288
shutil .copy (js_out , 'fake.js' )
1289
1289
1290
1290
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 )
1292
1292
disabled_size = os .path .getsize (js_out )
1293
1293
if self .is_wasm ():
1294
1294
disabled_size += os .path .getsize ('test_exceptions_allowed.wasm' )
@@ -7097,10 +7097,10 @@ def test(args=None, asserts=False):
7097
7097
if self .get_setting ('WASM_BIGINT' ):
7098
7098
out_suffix += '_bigint'
7099
7099
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 )
7104
7104
7105
7105
if self .get_setting ('WASM_BIGINT' ):
7106
7106
self .cflags += ['-DWASM_BIGINT' ]
@@ -7774,7 +7774,7 @@ def test_embind_sync_if_pthread_delayed(self):
7774
7774
self .set_setting ('PTHREAD_POOL_DELAY_LOAD' , 1 )
7775
7775
self .set_setting ('PTHREAD_POOL_SIZE' , 1 )
7776
7776
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' )
7778
7778
7779
7779
### Tests for tools
7780
7780
@@ -8098,13 +8098,13 @@ def test_minmax(self):
8098
8098
self .do_runf ('test_minmax.c' , 'NAN != NAN\n Success!' )
8099
8099
8100
8100
def test_localeconv (self ):
8101
- self .do_run_in_out_file_test ( 'core/ test_localeconv.c' )
8101
+ self .do_core_test ( ' test_localeconv.c' )
8102
8102
8103
8103
def test_newlocale (self ):
8104
- self .do_run_in_out_file_test ( 'core/ test_newlocale.c' )
8104
+ self .do_core_test ( ' test_newlocale.c' )
8105
8105
8106
8106
def test_setlocale (self ):
8107
- self .do_run_in_out_file_test ( 'core/ test_setlocale.c' )
8107
+ self .do_core_test ( ' test_setlocale.c' )
8108
8108
8109
8109
def test_vswprintf_utf8 (self ):
8110
8110
self .do_core_test ('test_vswprintf_utf8.c' )
@@ -9166,7 +9166,7 @@ def test_fpic_static(self):
9166
9166
def test_pthread_create (self ):
9167
9167
self .set_setting ('ENVIRONMENT' , 'node' )
9168
9168
self .set_setting ('STRICT' )
9169
- self .do_run_in_out_file_test ( 'core/ pthread/create.c' )
9169
+ self .do_core_test ( ' pthread/create.c' )
9170
9170
9171
9171
@flaky ('https://github.com/emscripten-core/emscripten/issues/22617' )
9172
9172
@node_pthreads
@@ -9212,50 +9212,50 @@ def test_pthread_create_pool(self):
9212
9212
# with a pool, we can synchronously depend on workers being available
9213
9213
self .set_setting ('PTHREAD_POOL_SIZE' , 2 )
9214
9214
self .cflags += ['-DALLOW_SYNC' ]
9215
- self .do_run_in_out_file_test ( 'core/ pthread/create.c' )
9215
+ self .do_core_test ( ' pthread/create.c' )
9216
9216
9217
9217
@node_pthreads
9218
9218
def test_pthread_create_proxy (self ):
9219
9219
# with PROXY_TO_PTHREAD, we can synchronously depend on workers being available
9220
9220
self .set_setting ('PROXY_TO_PTHREAD' )
9221
9221
self .set_setting ('EXIT_RUNTIME' )
9222
9222
self .cflags += ['-DALLOW_SYNC' ]
9223
- self .do_run_in_out_file_test ( 'core/ pthread/create.c' )
9223
+ self .do_core_test ( ' pthread/create.c' )
9224
9224
9225
9225
@node_pthreads
9226
9226
def test_pthread_create_embind_stack_check (self ):
9227
9227
# embind should work with stack overflow checks (see #12356)
9228
9228
self .set_setting ('STACK_OVERFLOW_CHECK' , 2 )
9229
9229
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' ])
9231
9231
9232
9232
@node_pthreads
9233
9233
def test_pthread_exceptions (self ):
9234
9234
self .set_setting ('PTHREAD_POOL_SIZE' , 2 )
9235
9235
self .cflags += ['-fexceptions' ]
9236
- self .do_run_in_out_file_test ( 'core/ pthread/exceptions.cpp' )
9236
+ self .do_core_test ( ' pthread/exceptions.cpp' )
9237
9237
9238
9238
@node_pthreads
9239
9239
def test_pthread_exit_process (self ):
9240
9240
self .set_setting ('PROXY_TO_PTHREAD' )
9241
9241
self .set_setting ('EXIT_RUNTIME' )
9242
9242
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 )
9244
9244
9245
9245
@node_pthreads
9246
9246
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' )
9248
9248
9249
9249
@node_pthreads
9250
9250
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' )
9252
9252
9253
9253
@node_pthreads
9254
9254
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' )
9256
9256
9257
9257
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' )
9259
9259
9260
9260
@node_pthreads
9261
9261
def test_pthread_unhandledrejection (self ):
@@ -9280,23 +9280,23 @@ def test_pthread_offset_converter(self):
9280
9280
self .do_runf ('core/test_return_address.c' , 'passed' )
9281
9281
9282
9282
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' )
9284
9284
9285
9285
@node_pthreads
9286
9286
def test_emscripten_atomics (self ):
9287
9287
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' )
9289
9289
9290
9290
@node_pthreads
9291
9291
def test_emscripten_futexes (self ):
9292
9292
self .cflags .append ('-pthread' )
9293
9293
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' )
9295
9295
9296
9296
@node_pthreads
9297
9297
def test_stdio_locking (self ):
9298
9298
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' )
9300
9300
9301
9301
@with_dylink_reversed
9302
9302
@node_pthreads
@@ -9589,7 +9589,7 @@ def test_main_module_js_symbol(self):
9589
9589
def test_emscripten_async_call (self ):
9590
9590
# Depends on `atexit`
9591
9591
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' )
9593
9593
9594
9594
@no_asan ('asyncify stack operations confuse asan' )
9595
9595
@no_modularize_instance ('ASYNCIFY=1 requires DYNCALLS' )
0 commit comments