@@ -3607,18 +3607,19 @@ def test_no_exit_runtime_warnings_flush(self):
3607
3607
''' )
3608
3608
warning = 'stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1'
3609
3609
3610
- def test (cxx , no_exit , assertions , flush , keepalive ):
3610
+ def test (cxx , no_exit , assertions , flush = 0 , keepalive = 0 , filesystem = 1 ):
3611
3611
if cxx :
3612
3612
cmd = [EMXX , 'code.cpp' ]
3613
3613
else :
3614
3614
cmd = [EMCC , 'code.c' ]
3615
- # TODO: also check FILESYSTEM=0 here. it never worked though, buffered output was not emitted at shutdown
3616
- print ('%s: no_exit=%d assertions=%d flush=%d keepalive=%d' % (cmd [1 ], no_exit , assertions , flush , keepalive ))
3615
+ print ('%s: no_exit=%d assertions=%d flush=%d keepalive=%d filesystem=%d' % (cmd [1 ], no_exit , assertions , flush , keepalive , filesystem ))
3617
3616
cmd += ['-sEXIT_RUNTIME=%d' % (1 - no_exit ), '-sASSERTIONS=%d' % assertions ]
3618
3617
if flush :
3619
3618
cmd += ['-DFLUSH' ]
3620
3619
if keepalive :
3621
3620
cmd += ['-DKEEPALIVE' ]
3621
+ if not filesystem :
3622
+ cmd += ['-sNO_FILESYSTEM' ]
3622
3623
self .run_process (cmd )
3623
3624
output = self .run_js ('a.out.js' )
3624
3625
exit = 1 - no_exit
@@ -3628,13 +3629,14 @@ def test(cxx, no_exit, assertions, flush, keepalive):
3628
3629
3629
3630
# Run just one test with KEEPALIVE set. In this case we don't expect to see any kind
3630
3631
# of warning becasue we are explictly requesting the runtime stay alive for later use.
3631
- test (cxx = 0 , no_exit = 1 , assertions = 1 , flush = 0 , keepalive = 1 )
3632
+ test (cxx = 0 , no_exit = 1 , assertions = 1 , keepalive = 1 )
3633
+ test (cxx = 0 , no_exit = 1 , assertions = 1 , filesystem = 0 )
3632
3634
3633
3635
for cxx in [0 , 1 ]:
3634
3636
for no_exit in [0 , 1 ]:
3635
3637
for assertions in [0 , 1 ]:
3636
3638
for flush in [0 , 1 ]:
3637
- test (cxx , no_exit , assertions , flush , 0 )
3639
+ test (cxx , no_exit , assertions , flush )
3638
3640
3639
3641
def test_fs_after_main (self ):
3640
3642
for args in [[], ['-O1' ]]:
0 commit comments