summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xauto_update_tests.py14
-rwxr-xr-xscripts/test/wasm2asm.py10
-rw-r--r--test/wasm2asm/address.2asm.js (renamed from test/address.2asm.js)0
-rw-r--r--test/wasm2asm/br_table_temp.2asm.js (renamed from test/br_table_temp.2asm.js)0
-rw-r--r--test/wasm2asm/empty_imported_table.2asm.js (renamed from test/empty_imported_table.2asm.js)0
-rw-r--r--test/wasm2asm/empty_table.2asm.js (renamed from test/empty_table.2asm.js)0
-rw-r--r--test/wasm2asm/float-ops.2asm.js (renamed from test/float-ops.2asm.js)0
-rw-r--r--test/wasm2asm/forward.2asm.js (renamed from test/forward.2asm.js)0
-rw-r--r--test/wasm2asm/get-set-local.2asm.js (renamed from test/get-set-local.2asm.js)0
-rw-r--r--test/wasm2asm/grow_memory.2asm.js (renamed from test/grow_memory.2asm.js)0
-rw-r--r--test/wasm2asm/hello_world.2asm.js (renamed from test/hello_world.2asm.js)0
-rw-r--r--test/wasm2asm/i32.2asm.js (renamed from test/i32.2asm.js)0
-rw-r--r--test/wasm2asm/i64-add-sub.2asm.js (renamed from test/i64-add-sub.2asm.js)0
-rw-r--r--test/wasm2asm/i64-lowering.2asm.js (renamed from test/i64-lowering.2asm.js)0
-rw-r--r--test/wasm2asm/i64-shifts.2asm.js (renamed from test/i64-shifts.2asm.js)0
-rw-r--r--test/wasm2asm/unary-ops.2asm.js (renamed from test/unary-ops.2asm.js)0
-rw-r--r--test/wasm2asm/wasm2asm.wast.asserts (renamed from test/wasm2asm.wast.asserts)0
17 files changed, 14 insertions, 10 deletions
diff --git a/auto_update_tests.py b/auto_update_tests.py
index 280385ca4..73245d524 100755
--- a/auto_update_tests.py
+++ b/auto_update_tests.py
@@ -8,7 +8,7 @@ from scripts.test.shared import (
WASM_CTOR_EVAL, WASM_MERGE, WASM_REDUCE, WASM2ASM, WASM_METADCE,
WASM_EMSCRIPTEN_FINALIZE, BINARYEN_INSTALL_DIR,
files_with_pattern, has_shell_timeout)
-from scripts.test.wasm2asm import tests, spec_tests, extra_tests, assert_tests
+from scripts.test.wasm2asm import tests, spec_tests, extra_wasm2asm_tests, assert_tests, wasm2asm_dir
print '[ processing and updating testcases... ]\n'
@@ -292,14 +292,18 @@ for t in os.listdir(os.path.join('test', 'ctor-eval')):
print '\n[ checking wasm2asm ]\n'
-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('test', asm)
+ expected_file = os.path.join(wasm2asm_dir, asm)
- if not os.path.exists(expected_file):
+ # we run wasm2asm on tests and spec tests only if the output
+ # exists - only some work so far. the tests in extra are in
+ # the test/wasm2asm dir and so are specific to wasm2asm, and
+ # we run all of those.
+ if wasm not in extra_wasm2asm_tests and not os.path.exists(expected_file):
continue
print '..', wasm
@@ -316,7 +320,7 @@ for wasm in assert_tests:
asserts_expected_file = os.path.join('test', asserts)
traps_expected_file = os.path.join('test', traps)
- cmd = WASM2ASM + [os.path.join('test', wasm), '--allow-asserts']
+ cmd = WASM2ASM + [os.path.join(wasm2asm_dir, wasm), '--allow-asserts']
out = run_command(cmd)
with open(asserts_expected_file, 'w') as o: o.write(out)
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)
diff --git a/test/address.2asm.js b/test/wasm2asm/address.2asm.js
index a8b376951..a8b376951 100644
--- a/test/address.2asm.js
+++ b/test/wasm2asm/address.2asm.js
diff --git a/test/br_table_temp.2asm.js b/test/wasm2asm/br_table_temp.2asm.js
index 44153eedb..44153eedb 100644
--- a/test/br_table_temp.2asm.js
+++ b/test/wasm2asm/br_table_temp.2asm.js
diff --git a/test/empty_imported_table.2asm.js b/test/wasm2asm/empty_imported_table.2asm.js
index 775bb4e1f..775bb4e1f 100644
--- a/test/empty_imported_table.2asm.js
+++ b/test/wasm2asm/empty_imported_table.2asm.js
diff --git a/test/empty_table.2asm.js b/test/wasm2asm/empty_table.2asm.js
index ba5ebd6c7..ba5ebd6c7 100644
--- a/test/empty_table.2asm.js
+++ b/test/wasm2asm/empty_table.2asm.js
diff --git a/test/float-ops.2asm.js b/test/wasm2asm/float-ops.2asm.js
index e2dd5d528..e2dd5d528 100644
--- a/test/float-ops.2asm.js
+++ b/test/wasm2asm/float-ops.2asm.js
diff --git a/test/forward.2asm.js b/test/wasm2asm/forward.2asm.js
index d0ddd82dc..d0ddd82dc 100644
--- a/test/forward.2asm.js
+++ b/test/wasm2asm/forward.2asm.js
diff --git a/test/get-set-local.2asm.js b/test/wasm2asm/get-set-local.2asm.js
index e7203c9cd..e7203c9cd 100644
--- a/test/get-set-local.2asm.js
+++ b/test/wasm2asm/get-set-local.2asm.js
diff --git a/test/grow_memory.2asm.js b/test/wasm2asm/grow_memory.2asm.js
index 8f58b544e..8f58b544e 100644
--- a/test/grow_memory.2asm.js
+++ b/test/wasm2asm/grow_memory.2asm.js
diff --git a/test/hello_world.2asm.js b/test/wasm2asm/hello_world.2asm.js
index 8baa490cf..8baa490cf 100644
--- a/test/hello_world.2asm.js
+++ b/test/wasm2asm/hello_world.2asm.js
diff --git a/test/i32.2asm.js b/test/wasm2asm/i32.2asm.js
index d488213fd..d488213fd 100644
--- a/test/i32.2asm.js
+++ b/test/wasm2asm/i32.2asm.js
diff --git a/test/i64-add-sub.2asm.js b/test/wasm2asm/i64-add-sub.2asm.js
index d9c2a389b..d9c2a389b 100644
--- a/test/i64-add-sub.2asm.js
+++ b/test/wasm2asm/i64-add-sub.2asm.js
diff --git a/test/i64-lowering.2asm.js b/test/wasm2asm/i64-lowering.2asm.js
index 323abd13e..323abd13e 100644
--- a/test/i64-lowering.2asm.js
+++ b/test/wasm2asm/i64-lowering.2asm.js
diff --git a/test/i64-shifts.2asm.js b/test/wasm2asm/i64-shifts.2asm.js
index aa2c53512..aa2c53512 100644
--- a/test/i64-shifts.2asm.js
+++ b/test/wasm2asm/i64-shifts.2asm.js
diff --git a/test/unary-ops.2asm.js b/test/wasm2asm/unary-ops.2asm.js
index 293aa8d0b..293aa8d0b 100644
--- a/test/unary-ops.2asm.js
+++ b/test/wasm2asm/unary-ops.2asm.js
diff --git a/test/wasm2asm.wast.asserts b/test/wasm2asm/wasm2asm.wast.asserts
index 353f563f2..353f563f2 100644
--- a/test/wasm2asm.wast.asserts
+++ b/test/wasm2asm/wasm2asm.wast.asserts