summaryrefslogtreecommitdiff
path: root/auto_update_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'auto_update_tests.py')
-rwxr-xr-xauto_update_tests.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/auto_update_tests.py b/auto_update_tests.py
index 75396655e..1ecbb7a40 100755
--- a/auto_update_tests.py
+++ b/auto_update_tests.py
@@ -79,6 +79,13 @@ for t in sorted(os.listdir(os.path.join('test', 'passes'))):
actual += run_command(cmd)
with open(os.path.join('test', 'passes', passname + '.txt'), 'w') as o: o.write(actual)
+print '\n[ checking wasm-opt -o notation... ]\n'
+
+wast = os.path.join('test', 'hello_world.wast')
+cmd = [os.path.join('bin', 'wasm-opt'), wast, '-o', 'a.wast']
+run_command(cmd)
+open(wast, 'w').write(open('a.wast').read())
+
print '\n[ checking binary format testcases... ]\n'
for wast in sorted(os.listdir('test')):
@@ -145,4 +152,15 @@ for t in sorted(os.listdir(os.path.join('test', 'example'))):
# Also removes debug directory produced on Mac OS
shutil.rmtree(output_file + '.dSYM')
+print '\n[ checking wasm-opt testcases... ]\n'
+
+for t in os.listdir('test'):
+ if t.endswith('.wast') and not t.startswith('spec'):
+ print '..', t
+ t = os.path.join('test', t)
+ cmd = [os.path.join('bin', 'wasm-opt'), t, '--print']
+ actual = run_command(cmd)
+ actual = actual.replace('printing before:\n', '')
+ open(t, 'w').write(actual)
+
print '\n[ success! ]'