diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-11-01 15:39:04 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-11-01 15:39:04 -0800 |
commit | b2e067893efbe22132b210d5af9026b7bd59c270 (patch) | |
tree | d732657c9b2e0136279e3323bbabda8d4bb4e3f0 /check.py | |
parent | 44e83f2fb039a38b0764a172aa7c64ec3290d8c5 (diff) | |
download | binaryen-b2e067893efbe22132b210d5af9026b7bd59c270.tar.gz binaryen-b2e067893efbe22132b210d5af9026b7bd59c270.tar.bz2 binaryen-b2e067893efbe22132b210d5af9026b7bd59c270.zip |
fix do-while loops
Diffstat (limited to 'check.py')
-rwxr-xr-x | check.py | 29 |
1 files changed, 16 insertions, 13 deletions
@@ -79,19 +79,22 @@ 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_wasm.js.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) - else: - print ' (no post)' - 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) + for opts in [[], ['-O1'], ['-O3', '--profiling']]: + command = ['./emcc_to_wasm.js.sh', os.path.join('test', c)] + opts + extra + subprocess.check_call(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + print '....' + ' '.join(command) + if post: + open('a.normal.js', 'a').write(post) + open('a.wasm.js', 'a').write(post) + else: + print ' (no post)' + 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! ]' |