summaryrefslogtreecommitdiff
path: root/auto_update_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'auto_update_tests.py')
-rwxr-xr-xauto_update_tests.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/auto_update_tests.py b/auto_update_tests.py
index 9f569d14d..76cd02cbb 100755
--- a/auto_update_tests.py
+++ b/auto_update_tests.py
@@ -193,6 +193,26 @@ for t in os.listdir('test'):
open(t + '.fromBinary', 'w').write(actual)
+print '\n[ checking wasm-merge... ]\n'
+
+for t in os.listdir(os.path.join('test', 'merge')):
+ if t.endswith(('.wast', '.wasm')):
+ print '..', t
+ t = os.path.join('test', 'merge', t)
+ u = t + '.toMerge'
+ for finalize in [0, 1]:
+ for opt in [0, 1]:
+ cmd = [os.path.join('bin', 'wasm-merge'), t, u, '-o', 'a.wast', '-S', '--verbose']
+ if finalize: cmd += ['--finalize-memory-base=1024', '--finalize-table-base=8']
+ if opt: cmd += ['-O']
+ stdout = run_command(cmd)
+ actual = open('a.wast').read()
+ out = t + '.combined'
+ if finalize: out += '.finalized'
+ if opt: out += '.opt'
+ with open(out, 'w') as o: o.write(actual)
+ with open(out + '.stdout', 'w') as o: o.write(stdout)
+
print '\n[ checking binaryen.js testcases... ]\n'
for s in sorted(os.listdir(os.path.join('test', 'binaryen.js'))):