From d5629c6dbb9b8ab05963ea900be526087f5b0b00 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 4 Nov 2015 18:13:32 -0800 Subject: get first spec testcase passing --- check.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'check.py') diff --git a/check.py b/check.py index a4f1157d1..4ff4430a3 100755 --- a/check.py +++ b/check.py @@ -67,7 +67,7 @@ for asm in tests: print '\n[ checking wasm-shell testcases... ]\n' for t in tests: - if t.endswith('.wast'): + if t.endswith('.wast') and not t.startswith('spec'): print '..', t t = os.path.join('test', t) actual, err = subprocess.Popen([os.path.join('bin', 'wasm-shell'), t, 'print-wasm'], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() @@ -88,15 +88,16 @@ for t in spec_tests: if t.startswith('spec') and t.endswith('.wast'): print '..', t wast = os.path.join('test', t) - actual, err = subprocess.Popen([os.path.join('bin', 'wasm-shell'), wast], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() - assert err == '', 'bad err:' + err + proc = subprocess.Popen([os.path.join('bin', 'wasm-shell'), wast], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + actual, err = proc.communicate() + assert proc.returncode == 0, err expected = os.path.join('test', 'spec', 'expected-output', os.path.basename(wast) + '.log') if os.path.exists(expected): expected = open(expected).read() else: print ' (no expected output)' - expected = '' + continue if actual != expected: fail(actual, expected) -- cgit v1.2.3