From f0058e1fb8e1273a714f7a2526fe19addb2c0f4f Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 29 Oct 2015 13:10:58 -0700 Subject: check.py improvements --- check.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'check.py') diff --git a/check.py b/check.py index 62fa98e9f..55ffab9b1 100755 --- a/check.py +++ b/check.py @@ -7,9 +7,11 @@ print 'checking testcases...\n' for asm in os.listdir('test'): if asm.endswith('.asm.js'): print ' ', asm, ' ', - wasm = asm.replace('.asm.js', '.wasm') + wasm = asm.replace('.asm.js', '.wast') actual, err = subprocess.Popen([os.path.join('bin', 'asm2wasm'), os.path.join('test', asm)], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() assert err == '', 'bad err:' + err + if not os.path.exists(os.path.join('test', wasm)): + raise Exception('output .wast file does not exist') expected = open(os.path.join('test', wasm)).read() if actual != expected: raise Exception("Expected to have '%s' == '%s', diff:\n\n%s" % ( -- cgit v1.2.3