summaryrefslogtreecommitdiff
path: root/auto_update_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'auto_update_tests.py')
-rwxr-xr-xauto_update_tests.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/auto_update_tests.py b/auto_update_tests.py
index 8f34e9800..ce4c63745 100755
--- a/auto_update_tests.py
+++ b/auto_update_tests.py
@@ -310,6 +310,20 @@ def update_reduce_tests():
support.run_command(shared.WASM_DIS + ['c.wasm', '-o', expected])
+def update_spec_tests():
+ print('\n[ updating wasm-shell spec testcases... ]\n')
+
+ for t in shared.options.spec_tests:
+ print('..', os.path.basename(t))
+
+ cmd = shared.WASM_SHELL + [t]
+ expected = os.path.join(shared.get_test_dir('spec'), 'expected-output', os.path.basename(t) + '.log')
+ if os.path.isfile(expected):
+ stdout = support.run_command(cmd, stderr=subprocess.PIPE)
+ with open(expected, 'w') as o:
+ o.write(stdout)
+
+
TEST_SUITES = OrderedDict([
('wasm-opt', update_wasm_opt_tests),
('asm2wasm', update_asm_js_tests),
@@ -318,6 +332,7 @@ TEST_SUITES = OrderedDict([
('ctor-eval', update_ctor_eval_tests),
('wasm-metadce', update_metadce_tests),
('wasm-reduce', update_reduce_tests),
+ ('spec', update_spec_tests),
('binaryenjs', update_binaryen_js_tests),
('lld', lld.update_lld_tests),
('wasm2js', wasm2js.update_wasm2js_tests),