summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2018-05-13 10:46:37 -0700
committerGitHub <noreply@github.com>2018-05-13 10:46:37 -0700
commit4282c9478c7cb435401e0eed1a464c1d7a2db213 (patch)
treefa3689ab10e428f1cd9cd853f8884f2bc6e4ab4c /scripts
parent51e515748e56c3ace6b3181e9ca8bf464c86f0e0 (diff)
downloadbinaryen-4282c9478c7cb435401e0eed1a464c1d7a2db213.tar.gz
binaryen-4282c9478c7cb435401e0eed1a464c1d7a2db213.tar.bz2
binaryen-4282c9478c7cb435401e0eed1a464c1d7a2db213.zip
Clean up wasm2asm testing (#1546)
* Move wasm2asm test outputs into their natural location, test/wasm2asm/ * Let people create new tests in there that ./auto_update_tests.py will auto-generate outputs for, just like all the other tests.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/test/wasm2asm.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/test/wasm2asm.py b/scripts/test/wasm2asm.py
index 81cb9b5c5..d186cff4c 100755
--- a/scripts/test/wasm2asm.py
+++ b/scripts/test/wasm2asm.py
@@ -14,18 +14,18 @@ spec_tests = [os.path.join(spec_dir, t)
for t in sorted(os.listdir(spec_dir))
if '.fail' not in t]
wasm2asm_dir = os.path.join(options.binaryen_test, 'wasm2asm')
-extra_tests = [os.path.join(wasm2asm_dir, t) for t in
- sorted(os.listdir(wasm2asm_dir))]
+extra_wasm2asm_tests = [os.path.join(wasm2asm_dir, t) for t in
+ sorted(os.listdir(wasm2asm_dir))]
assert_tests = ['wasm2asm.wast.asserts']
def test_wasm2asm_output():
- for wasm in tests + spec_tests + extra_tests:
+ for wasm in tests + spec_tests + extra_wasm2asm_tests:
if not wasm.endswith('.wast'):
continue
asm = os.path.basename(wasm).replace('.wast', '.2asm.js')
- expected_file = os.path.join(options.binaryen_test, asm)
+ expected_file = os.path.join(wasm2asm_dir, asm)
if not os.path.exists(expected_file):
continue
@@ -76,7 +76,7 @@ def test_asserts_output():
asserts_expected_file = os.path.join(options.binaryen_test, asserts)
traps_expected_file = os.path.join(options.binaryen_test, traps)
- wasm = os.path.join(options.binaryen_test, wasm)
+ wasm = os.path.join(wasm2asm_dir, wasm)
cmd = WASM2ASM + [wasm, '--allow-asserts']
out = run_command(cmd)
fail_if_not_identical_to_file(out, asserts_expected_file)