diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-10-31 20:46:12 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-10-31 20:46:12 -0700 |
commit | 4d566bd9c9084cb57adc9d206cac612bec02c63c (patch) | |
tree | 705029d7936e80e2e557ea2925191d44ca48cb2a /check.py | |
parent | cfb0cefcf93417a30c03bca7ff0a6c4d0428b1b5 (diff) | |
download | binaryen-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-x | check.py | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -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! ]' |