summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-11-04 18:13:32 -0800
committerAlon Zakai <alonzakai@gmail.com>2015-11-04 19:26:53 -0800
commitd5629c6dbb9b8ab05963ea900be526087f5b0b00 (patch)
treeae42692718a3182a9f05ffa81680e2a0fba58518
parentf36058e50d0aadcdeeb68716e69af83c75a51cff (diff)
downloadbinaryen-d5629c6dbb9b8ab05963ea900be526087f5b0b00.tar.gz
binaryen-d5629c6dbb9b8ab05963ea900be526087f5b0b00.tar.bz2
binaryen-d5629c6dbb9b8ab05963ea900be526087f5b0b00.zip
get first spec testcase passing
-rwxr-xr-xcheck.py9
1 files changed, 5 insertions, 4 deletions
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)