From 69ab50b8148f60bd873ce9bc57bd5e9fefafc4ba Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Sat, 9 Dec 2023 23:53:06 -0800 Subject: [PATCH] wasm2js script fix --- scripts/test/wasm2js.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/test/wasm2js.py b/scripts/test/wasm2js.py index ea299e4ed78..3a60f2af300 100644 --- a/scripts/test/wasm2js.py +++ b/scripts/test/wasm2js.py @@ -18,9 +18,9 @@ from . import shared from . import support -tests = shared.get_tests(shared.options.binaryen_test) +basic_tests = shared.get_tests(os.path.join(shared.options.binaryen_test, 'lit', 'basic')) # memory64 is not supported in wasm2js yet (but may be with BigInt eventually). -tests = [t for t in tests if '64.wast' not in t] +basic_tests = [t for t in basic_tests if '64.wast' not in t] spec_tests = shared.options.spec_tests spec_tests = [t for t in spec_tests if '.fail' not in t] spec_tests = [t for t in spec_tests if '64.wast' not in t] @@ -36,11 +36,13 @@ def check_for_stale_files(): # TODO(sbc): Generalize and apply other test suites all_tests = [] - for t in tests + spec_tests + wasm2js_tests: + for t in basic_tests + spec_tests + wasm2js_tests: all_tests.append(os.path.basename(os.path.splitext(t)[0])) all_files = os.listdir(shared.get_test_dir('wasm2js')) for f in all_files: + if f in assert_tests: + continue prefix = f.split('.')[0] if prefix not in all_tests: shared.fail_with_error('orphan test output: %s' % f) @@ -48,7 +50,7 @@ def check_for_stale_files(): def test_wasm2js_output(): for opt in (0, 1): - for t in tests + spec_tests + wasm2js_tests: + for t in basic_tests + spec_tests + wasm2js_tests: basename = os.path.basename(t) if basename in wasm2js_blacklist: continue @@ -152,7 +154,7 @@ def update_wasm2js_tests(): print('\n[ checking wasm2js ]\n') for opt in (0, 1): - for wasm in tests + spec_tests + wasm2js_tests: + for wasm in basic_tests + spec_tests + wasm2js_tests: if not wasm.endswith('.wast'): continue