summaryrefslogtreecommitdiff
path: root/check.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-10-31 20:46:12 -0700
committerAlon Zakai <alonzakai@gmail.com>2015-10-31 20:46:12 -0700
commit4d566bd9c9084cb57adc9d206cac612bec02c63c (patch)
tree705029d7936e80e2e557ea2925191d44ca48cb2a /check.py
parentcfb0cefcf93417a30c03bca7ff0a6c4d0428b1b5 (diff)
downloadbinaryen-4d566bd9c9084cb57adc9d206cac612bec02c63c.tar.gz
binaryen-4d566bd9c9084cb57adc9d206cac612bec02c63c.tar.bz2
binaryen-4d566bd9c9084cb57adc9d206cac612bec02c63c.zip
fix interpreter bugs in binary and compare; working add test in wasm polyfill
Diffstat (limited to 'check.py')
-rwxr-xr-xcheck.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/check.py b/check.py
index ad222907f..84c7c3904 100755
--- a/check.py
+++ b/check.py
@@ -78,15 +78,17 @@ for c in tests:
if os.path.exists(emcc):
extra = json.loads(open(emcc).read())
if os.path.exists('a.normal.js'): os.unlink('a.normal.js')
- subprocess.check_call(['./emcc_to_polyfill.sh', os.path.join('test', c)] + extra)
+ subprocess.check_call(['./emcc_to_polyfill.sh', os.path.join('test', c)] + extra, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if post:
open('a.normal.js', 'a').write(post)
open('a.wasm.js', 'a').write(post)
- proc = subprocess.Popen(['nodejs', 'a.normal.js'], stdout=subprocess.PIPE)
- out, err = proc.communicate()
- assert proc.returncode == 0
- if out.strip() != expected.strip():
- fail(out, expected)
+ for which in ['normal', 'wasm']:
+ print '....', which
+ proc = subprocess.Popen(['nodejs', 'a.' + which + '.js'], stdout=subprocess.PIPE)
+ out, err = proc.communicate()
+ assert proc.returncode == 0
+ if out.strip() != expected.strip():
+ fail(out, expected)
print '\n[ success! ]'