diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-11-04 18:13:32 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-11-04 19:26:53 -0800 |
commit | d5629c6dbb9b8ab05963ea900be526087f5b0b00 (patch) | |
tree | ae42692718a3182a9f05ffa81680e2a0fba58518 /check.py | |
parent | f36058e50d0aadcdeeb68716e69af83c75a51cff (diff) | |
download | binaryen-d5629c6dbb9b8ab05963ea900be526087f5b0b00.tar.gz binaryen-d5629c6dbb9b8ab05963ea900be526087f5b0b00.tar.bz2 binaryen-d5629c6dbb9b8ab05963ea900be526087f5b0b00.zip |
get first spec testcase passing
Diffstat (limited to 'check.py')
-rwxr-xr-x | check.py | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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) |