summaryrefslogtreecommitdiff
path: root/auto_update_tests.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-03-20 20:28:05 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-03-20 20:28:05 -0700
commitb3f029d8b3be1cfc74a035a6549f4ab2e62e9931 (patch)
tree0d919138efd26b77c37cc21727c9ae9d68cffeee /auto_update_tests.py
parentd802638ea36ce950f260c42e8bc8e2195c625efa (diff)
parentc67c3b8d9b5d09b1f04a602c6248be50ef51569f (diff)
downloadbinaryen-b3f029d8b3be1cfc74a035a6549f4ab2e62e9931.tar.gz
binaryen-b3f029d8b3be1cfc74a035a6549f4ab2e62e9931.tar.bz2
binaryen-b3f029d8b3be1cfc74a035a6549f4ab2e62e9931.zip
Merge pull request #265 from WebAssembly/asm2wasm-opts
asm2wasm opts
Diffstat (limited to 'auto_update_tests.py')
-rwxr-xr-xauto_update_tests.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/auto_update_tests.py b/auto_update_tests.py
index 5c2c37dcb..f4f8d0c1d 100755
--- a/auto_update_tests.py
+++ b/auto_update_tests.py
@@ -6,10 +6,16 @@ print '[ processing and updating testcases... ]\n'
for asm in sorted(os.listdir('test')):
if asm.endswith('.asm.js'):
- print '..', asm
wasm = asm.replace('.asm.js', '.fromasm')
- actual, err = subprocess.Popen([os.path.join('bin', 'asm2wasm'), os.path.join('test', asm)], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
- open(os.path.join('test', wasm), 'w').write(actual)
+ 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 wasm in sorted(os.listdir('test')):
if wasm.endswith('.wast') and os.path.basename(wasm) not in ['kitchen_sink.wast']: # i64s in kitchen_sink