From a99e4f20a773aa7d6698e126ff7f39290db54675 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 4 Nov 2015 09:39:33 -0800 Subject: start testing wasm-shell --- check.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'check.py') 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: -- cgit v1.2.3