diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-05-19 15:26:43 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-05-19 15:26:43 -0700 |
commit | 322e89791721ce5130242c87eb1c01163f0ad21d (patch) | |
tree | c973874122f05eedebf00f9c109dc3006a2dea7b /auto_update_tests.py | |
parent | 08abcbb9211cc1452a8b6420d4e160aaad061e01 (diff) | |
download | binaryen-322e89791721ce5130242c87eb1c01163f0ad21d.tar.gz binaryen-322e89791721ce5130242c87eb1c01163f0ad21d.tar.bz2 binaryen-322e89791721ce5130242c87eb1c01163f0ad21d.zip |
add --no-opt testing to asm2wasm
Diffstat (limited to 'auto_update_tests.py')
-rwxr-xr-x | auto_update_tests.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/auto_update_tests.py b/auto_update_tests.py index 378f511cc..6f86bc1fe 100755 --- a/auto_update_tests.py +++ b/auto_update_tests.py @@ -6,16 +6,20 @@ print '[ processing and updating testcases... ]\n' for asm in sorted(os.listdir('test')): if asm.endswith('.asm.js'): - wasm = asm.replace('.asm.js', '.fromasm') for precise in [1, 0]: - cmd = [os.path.join('bin', 'asm2wasm'), os.path.join('test', asm)] - if not precise: - cmd += ['--imprecise'] - wasm += '.imprecise' - print '..', asm, wasm - print ' ', ' '.join(cmd) - actual, err = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() - open(os.path.join('test', wasm), 'w').write(actual) + for opts in [1, 0]: + cmd = [os.path.join('bin', 'asm2wasm'), os.path.join('test', asm)] + wasm = asm.replace('.asm.js', '.fromasm') + if not precise: + cmd += ['--imprecise'] + wasm += '.imprecise' + if not opts: + cmd += ['--no-opts'] + wasm += '.no-opts' + print '..', asm, wasm + print ' ', ' '.join(cmd) + actual, err = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() + open(os.path.join('test', wasm), 'w').write(actual) for dot_s_dir in ['dot_s', 'llvm_autogenerated']: for s in sorted(os.listdir(os.path.join('test', dot_s_dir))): |