@@ -7436,14 +7436,15 @@ def test_demangle_stacks_symbol_map(self):
74367436 self .set_setting ('DEFAULT_LIBRARY_FUNCS_TO_INCLUDE' , '$stackTrace' )
74377437
74387438 self .set_setting ('DEMANGLE_SUPPORT' )
7439+ self .set_setting ('ENVIRONMENT' , 'node,shell' )
74397440 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 :
74407441 self .skipTest ("without opts, we don't emit a symbol map" )
74417442 self .emcc_args += ['--emit-symbol-map' ]
74427443 self .do_runf (test_file ('core/test_demangle_stacks.cpp' ), 'Aborted' , assert_returncode = NON_ZERO )
74437444 # make sure the shortened name is the right one
74447445 full_aborter = None
74457446 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 ():
74477448 if ':' not in line :
74487449 continue
74497450 # split by the first ':' (wasm backend demangling may include more :'s later on)
@@ -7454,7 +7455,7 @@ def test_demangle_stacks_symbol_map(self):
74547455 self .assertIsNotNone (full_aborter )
74557456 self .assertIsNotNone (short_aborter )
74567457 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 :
74587459 output = self .run_js ('test_demangle_stacks.js' , engine = config .SPIDERMONKEY_ENGINE , assert_returncode = NON_ZERO )
74597460 # we may see the full one, if -g, or the short one if not
74607461 if ' ' + short_aborter + ' ' not in output and ' ' + full_aborter + ' ' not in output :
0 commit comments