summaryrefslogtreecommitdiff
path: root/check.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-01-12 11:36:19 -0800
committerAlon Zakai <alonzakai@gmail.com>2016-01-12 11:36:19 -0800
commit84211500dbf6860d745a3f0a251cdd169896deac (patch)
treed92163ccd3dc5ebdab93607d71b5a541a2656bbd /check.py
parent2e5363210f7ef4861bf734e89fef96176b4157bc (diff)
downloadbinaryen-84211500dbf6860d745a3f0a251cdd169896deac.tar.gz
binaryen-84211500dbf6860d745a3f0a251cdd169896deac.tar.bz2
binaryen-84211500dbf6860d745a3f0a251cdd169896deac.zip
test wasm-as does not crash when binarifying testcases
Diffstat (limited to 'check.py')
-rwxr-xr-xcheck.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/check.py b/check.py
index 94cd663d9..1395a306c 100755
--- a/check.py
+++ b/check.py
@@ -278,6 +278,16 @@ if torture:
if unexpected_result_count:
fail(unexpected_result_count, 0)
+print '\n[ checking wasm-as testcases... ]\n'
+
+for wast in tests:
+ if wast.endswith('.wast'):
+ cmd = [os.path.join('bin', 'wasm-as'), os.path.join('test', wast), '-o', 'a.wasm']
+ print cmd
+ if os.path.exists('a.wasm'): os.unlink('a.wasm')
+ subprocess.check_call(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ assert os.path.exists('a.wasm')
+
print '\n[ checking example testcases... ]\n'
cmd = [os.environ.get('CXX') or 'g++', '-std=c++11', os.path.join('test', 'example', 'find_div0s.cpp'), '-Isrc', '-g', '-lsupport', '-Llib/.']