diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-11-04 09:39:33 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-11-04 09:39:33 -0800 |
commit | a99e4f20a773aa7d6698e126ff7f39290db54675 (patch) | |
tree | 9f72cea9440293958e8e9aaaea6f6b9bb151c5f0 /check.py | |
parent | 6dc54fdfd2b0c40f43fe854e7a463d5b726fd650 (diff) | |
download | binaryen-a99e4f20a773aa7d6698e126ff7f39290db54675.tar.gz binaryen-a99e4f20a773aa7d6698e126ff7f39290db54675.tar.bz2 binaryen-a99e4f20a773aa7d6698e126ff7f39290db54675.zip |
start testing wasm-shell
Diffstat (limited to 'check.py')
-rwxr-xr-x | check.py | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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: |