summaryrefslogtreecommitdiff
path: root/auto_update_tests.py
diff options
context:
space:
mode:
authorMichael <mbebenita@Michaels-MacBook-Pro-4.local>2016-02-22 15:11:09 -0800
committerMichael <mbebenita@Michaels-MacBook-Pro-4.local>2016-02-22 15:20:23 -0800
commitaf0f6ef999e8ddf9c168b697710fd313883e8807 (patch)
tree5790caa589d90349a0913f1322a6e42d7db8a043 /auto_update_tests.py
parent75a6357e2b57a908f955e4cc7b3e9e627524f385 (diff)
downloadbinaryen-af0f6ef999e8ddf9c168b697710fd313883e8807.tar.gz
binaryen-af0f6ef999e8ddf9c168b697710fd313883e8807.tar.bz2
binaryen-af0f6ef999e8ddf9c168b697710fd313883e8807.zip
Bug fix and adds printing / parsing tests.
Diffstat (limited to 'auto_update_tests.py')
-rwxr-xr-xauto_update_tests.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/auto_update_tests.py b/auto_update_tests.py
index 86c4ebbeb..939d8d278 100755
--- a/auto_update_tests.py
+++ b/auto_update_tests.py
@@ -44,6 +44,15 @@ for wasm in ['address.wast']:#os.listdir(os.path.join('test', 'spec')):
expected_file = os.path.join('test', asm)
open(expected_file, 'w').write(actual)
+for t in sorted(os.listdir(os.path.join('test', 'print'))):
+ if t.endswith('.wast'):
+ print '..', t
+ wasm = os.path.basename(t).replace('.wast', '')
+ cmd = [os.path.join('bin', 'binaryen-shell'), os.path.join('test', 'print', t), '--print']
+ print ' ', ' '.join(cmd)
+ actual, err = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
+ open(os.path.join('test', 'print', wasm + '.txt'), 'w').write(actual)
+
for t in sorted(os.listdir(os.path.join('test', 'passes'))):
if t.endswith('.wast'):
print '..', t