diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-10-31 15:48:08 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-10-31 15:48:08 -0700 |
commit | 6512f29a40c72979c05e73318b957e425363980e (patch) | |
tree | 7d4127f6d1f61b7de799b4e3ff08f214ed554e1c /check.py | |
parent | 547867eb0e78cac6be7f35bbd80c6582224df807 (diff) | |
download | binaryen-6512f29a40c72979c05e73318b957e425363980e.tar.gz binaryen-6512f29a40c72979c05e73318b957e425363980e.tar.bz2 binaryen-6512f29a40c72979c05e73318b957e425363980e.zip |
prepare for polyfill testing
Diffstat (limited to 'check.py')
-rwxr-xr-x | check.py | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -16,7 +16,7 @@ for arg in sys.argv[1:]: if not interpreter: print '[ no wasm interpreter provided, you should pass one as --interpreter=path/to/interpreter ]' -print '[ checking testcases... ]\n' +print '[ checking asm2wasm testcases... ]\n' if len(tests) == 0: tests = sorted(os.listdir('test')) @@ -59,5 +59,16 @@ for asm in tests: raise Exception('wasm interpreter error: ' + err) # failed to pretty-print raise Exception('wasm interpreter error') +print '\n[ checking emcc_to_polyfill testcases... (need both emcc and nodejs in your path) ]\n' + +print '..normal' + +if os.path.exists('a.normal.js'): os.unlink('a.normal.js') +subprocess.check_call(['./emcc_to_polyfill.sh', os.path.join('test', 'hello_world.c')]) +proc = subprocess.Popen(['nodejs', 'a.normal.js'], stdout=subprocess.PIPE) +out, err = proc.communicate() +assert proc.returncode == 0 +assert 'hello, world!' in out, out + print '\n[ success! ]' |