@@ -2400,15 +2400,17 @@ def test_runtime_misuse(self):
2400
2400
]:
2401
2401
for mode in [[], ['-s' , 'WASM=0' ]]:
2402
2402
print ('\n ' , filename , extra_args , mode )
2403
+
2403
2404
print ('mem init, so async, call too early' )
2404
2405
create_test_file ('post.js' , post_prep + post_test + post_hook )
2405
- self .btest (filename , expected = '600' , args = ['--post-js' , 'post.js' , '--memory-init-file' , '1' , '-s' , 'EXIT_RUNTIME=1' ] + extra_args + mode )
2406
+ self .btest (filename , expected = '600' , args = ['--post-js' , 'post.js' , '--memory-init-file' , '1' , '-s' , 'EXIT_RUNTIME=1' ] + extra_args + mode , reporting = False )
2406
2407
print ('sync startup, call too late' )
2407
2408
create_test_file ('post.js' , post_prep + 'Module.postRun.push(function() { ' + post_test + ' });' + post_hook )
2408
- self .btest (filename , expected = str (second_code ), args = ['--post-js' , 'post.js' , '-s' , 'EXIT_RUNTIME=1' ] + extra_args + mode )
2409
+ self .btest (filename , expected = str (second_code ), args = ['--post-js' , 'post.js' , '-s' , 'EXIT_RUNTIME=1' ] + extra_args + mode , reporting = False )
2410
+
2409
2411
print ('sync, runtime still alive, so all good' )
2410
2412
create_test_file ('post.js' , post_prep + 'expected_ok = true; Module.postRun.push(function() { ' + post_test + ' });' + post_hook )
2411
- self .btest (filename , expected = '606' , args = ['--post-js' , 'post.js' ] + extra_args + mode )
2413
+ self .btest (filename , expected = '606' , args = ['--post-js' , 'post.js' ] + extra_args + mode , reporting = False )
2412
2414
2413
2415
def test_cwrap_early (self ):
2414
2416
self .btest (os .path .join ('browser' , 'cwrap_early.cpp' ), args = ['-O2' , '-s' , 'ASSERTIONS=1' , '--pre-js' , path_from_root ('tests' , 'browser' , 'cwrap_early.js' ), '-s' , 'EXTRA_EXPORTED_RUNTIME_METHODS=["cwrap"]' ], expected = '0' )
@@ -4539,14 +4541,13 @@ def test_base64_atob_fallback(self):
4539
4541
#include <stdio.h>
4540
4542
#include <emscripten.h>
4541
4543
int main() {
4542
- REPORT_RESULT(0);
4543
4544
return 0;
4544
4545
}
4545
4546
''' )
4546
4547
# generate a dummy file
4547
4548
create_test_file ('dummy_file' , 'dummy' )
4548
4549
# compile the code with the modularize feature and the preload-file option enabled
4549
- self .compile_btest (['test.c' , '-s' , 'MODULARIZE=1' , '-s' , 'EXPORT_NAME="Foo"' , '--preload-file' , 'dummy_file' , '-s' , 'SINGLE_FILE=1' ])
4550
+ self .compile_btest (['test.c' , '-s' , 'EXIT_RUNTIME' , '-s' , ' MODULARIZE=1' , '-s' , 'EXPORT_NAME="Foo"' , '--preload-file' , 'dummy_file' , '-s' , 'SINGLE_FILE=1' ])
4550
4551
create_test_file ('a.html' , '''
4551
4552
<script>
4552
4553
atob = undefined;
@@ -4557,7 +4558,7 @@ def test_base64_atob_fallback(self):
4557
4558
var foo = Foo();
4558
4559
</script>
4559
4560
''' )
4560
- self .run_browser ('a.html' , '...' , '/report_result?0' )
4561
+ self .run_browser ('a.html' , '...' , '/report_result?exit: 0' )
4561
4562
4562
4563
# Tests that SINGLE_FILE works as intended in generated HTML (with and without Worker)
4563
4564
def test_single_file_html (self ):
0 commit comments