summaryrefslogtreecommitdiff
path: root/check.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-11-04 09:39:33 -0800
committerAlon Zakai <alonzakai@gmail.com>2015-11-04 09:39:33 -0800
commita99e4f20a773aa7d6698e126ff7f39290db54675 (patch)
tree9f72cea9440293958e8e9aaaea6f6b9bb151c5f0 /check.py
parent6dc54fdfd2b0c40f43fe854e7a463d5b726fd650 (diff)
downloadbinaryen-a99e4f20a773aa7d6698e126ff7f39290db54675.tar.gz
binaryen-a99e4f20a773aa7d6698e126ff7f39290db54675.tar.bz2
binaryen-a99e4f20a773aa7d6698e126ff7f39290db54675.zip
start testing wasm-shell
Diffstat (limited to 'check.py')
-rwxr-xr-xcheck.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/check.py b/check.py
index 7ec0d6343..70bef58ee 100755
--- a/check.py
+++ b/check.py
@@ -62,6 +62,19 @@ for asm in tests:
raise Exception('wasm interpreter error: ' + err) # failed to pretty-print
raise Exception('wasm interpreter error')
+print '\n[ checking wasm-shell testcases... ]\n'
+
+for t in tests:
+ if t.endswith('.wast'):
+ print '..', t
+ t = os.path.join('test', t)
+ actual, err = subprocess.Popen([os.path.join('bin', 'wasm-shell'), t], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
+ assert err == '', 'bad err:' + err
+
+ expected = open(t).read()
+ if actual != expected:
+ fail(actual, expected)
+
print '\n[ checking wasm.js polyfill testcases... (need both emcc and nodejs in your path) ]\n'
for c in tests: