Skip to content

Commit 931ffe3

Browse files
jgravelle-googlekripken
authored andcommitted
Disable test_autodebug for V8 (#4633)
* Disable test_autodebug for V8 test_autodebug is inaccurately marked no_wasm_backend(), when really it doesn't work in v8, with either backend or asm2wasm. v8 does work with asmjs, but just banning v8 is more accurate than not disabling this test for asm2wasm. * Exit early in autodebug when only running with V8
1 parent 4ead95c commit 931ffe3

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

tests/runner.py

+12-8
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,17 @@ def setup_runtimelink_test(self):
605605
'''
606606
return (main, supp)
607607

608+
def filtered_js_engines(self, js_engines=None):
609+
if js_engines is None:
610+
js_engines = JS_ENGINES
611+
for engine in js_engines: assert type(engine) == list
612+
for engine in self.banned_js_engines: assert type(engine) == list
613+
js_engines = filter(lambda engine: engine[0] not in map(lambda engine: engine[0], self.banned_js_engines), js_engines)
614+
if 'BINARYEN_METHOD="native-wasm"' in self.emcc_args:
615+
# when testing native wasm support, must use a vm with support
616+
js_engines = filter(lambda engine: engine == SPIDERMONKEY_ENGINE or engine == V8_ENGINE, js_engines)
617+
return js_engines
618+
608619
def do_run_from_file(self, src, expected_output, args=[], output_nicerizer=None, output_processor=None, no_build=False, main_file=None, additional_files=[], js_engines=None, post_build=None, basename='src.cpp', libraries=[], includes=[], force_c=False, build_ll_hook=None, extra_emscripten_args=[]):
609620
self.do_run(open(src).read(), open(expected_output).read(),
610621
args, output_nicerizer, output_processor, no_build, main_file,
@@ -626,14 +637,7 @@ def do_run(self, src, expected_output, args=[], output_nicerizer=None, output_pr
626637
build_ll_hook=build_ll_hook, extra_emscripten_args=extra_emscripten_args, post_build=post_build)
627638

628639
# Run in both JavaScript engines, if optimizing - significant differences there (typed arrays)
629-
if js_engines is None:
630-
js_engines = JS_ENGINES
631-
for engine in js_engines: assert type(engine) == list
632-
for engine in self.banned_js_engines: assert type(engine) == list
633-
js_engines = filter(lambda engine: engine[0] not in map(lambda engine: engine[0], self.banned_js_engines), js_engines)
634-
if 'BINARYEN_METHOD="native-wasm"' in self.emcc_args:
635-
# when testing native wasm support, must use a vm with support
636-
js_engines = filter(lambda engine: engine == SPIDERMONKEY_ENGINE or engine == V8_ENGINE, js_engines)
640+
js_engines = self.filtered_js_engines(js_engines)
637641
if len(js_engines) == 0: return self.skip('No JS engine present to run this test with. Check %s and the paths therein.' % EM_CONFIG)
638642
if len(js_engines) > 1 and not self.use_all_engines:
639643
if SPIDERMONKEY_ENGINE in js_engines: # make sure to get asm.js validation checks, using sm

tests/test_core.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -5740,9 +5740,14 @@ def do_autodebug_post(self, filename):
57405740
Building.llvm_as(filename)
57415741
Building.llvm_dis(filename)
57425742

5743-
# Broken on V8 but not node
5744-
@no_wasm_backend()
57455743
def test_autodebug(self):
5744+
if self.is_wasm():
5745+
# Broken on V8 but not node; wasm-only
5746+
self.banned_js_engines = [V8_ENGINE]
5747+
if not self.filtered_js_engines():
5748+
# Return early to not run into asserts
5749+
return self.skip('wasm on V8 currently fails')
5750+
57465751
if Building.LLVM_OPTS: return self.skip('LLVM opts mess us up')
57475752
Building.COMPILER_TEST_OPTS += ['--llvm-opts', '0']
57485753

0 commit comments

Comments
 (0)