@@ -7436,14 +7436,15 @@ def test_demangle_stacks_symbol_map(self):
7436
7436
self .set_setting ('DEFAULT_LIBRARY_FUNCS_TO_INCLUDE' , '$stackTrace' )
7437
7437
7438
7438
self .set_setting ('DEMANGLE_SUPPORT' )
7439
+ self .set_setting ('ENVIRONMENT' , 'node,shell' )
7439
7440
if '-O' not in str (self .emcc_args ) or '-O0' in self .emcc_args or '-O1' in self .emcc_args or '-g' in self .emcc_args :
7440
7441
self .skipTest ("without opts, we don't emit a symbol map" )
7441
7442
self .emcc_args += ['--emit-symbol-map' ]
7442
7443
self .do_runf (test_file ('core/test_demangle_stacks.cpp' ), 'Aborted' , assert_returncode = NON_ZERO )
7443
7444
# make sure the shortened name is the right one
7444
7445
full_aborter = None
7445
7446
short_aborter = None
7446
- for line in open ('test_demangle_stacks.js.symbols' ).readlines ():
7447
+ for line in read_file ('test_demangle_stacks.js.symbols' ).splitlines ():
7447
7448
if ':' not in line :
7448
7449
continue
7449
7450
# split by the first ':' (wasm backend demangling may include more :'s later on)
@@ -7454,7 +7455,7 @@ def test_demangle_stacks_symbol_map(self):
7454
7455
self .assertIsNotNone (full_aborter )
7455
7456
self .assertIsNotNone (short_aborter )
7456
7457
print ('full:' , full_aborter , 'short:' , short_aborter )
7457
- if config .SPIDERMONKEY_ENGINE and os . path . exists ( config . SPIDERMONKEY_ENGINE [ 0 ]) :
7458
+ if config .SPIDERMONKEY_ENGINE :
7458
7459
output = self .run_js ('test_demangle_stacks.js' , engine = config .SPIDERMONKEY_ENGINE , assert_returncode = NON_ZERO )
7459
7460
# we may see the full one, if -g, or the short one if not
7460
7461
if ' ' + short_aborter + ' ' not in output and ' ' + full_aborter + ' ' not in output :
0 commit comments