diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-01-06 16:29:41 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-01-06 16:29:41 -0800 |
commit | 88b14beb1009e81bbaf1144806c36fdee11846e1 (patch) | |
tree | 978adcece5c1ed0263c67abb9b49b1b9615e8f2e /auto_update_tests.py | |
parent | 3c32e7144c787fdba4953d98d9eb997abf407306 (diff) | |
download | binaryen-88b14beb1009e81bbaf1144806c36fdee11846e1.tar.gz binaryen-88b14beb1009e81bbaf1144806c36fdee11846e1.tar.bz2 binaryen-88b14beb1009e81bbaf1144806c36fdee11846e1.zip |
update auto_update_tests.py
Diffstat (limited to 'auto_update_tests.py')
-rwxr-xr-x | auto_update_tests.py | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/auto_update_tests.py b/auto_update_tests.py index 12cc253ec..6909dede5 100755 --- a/auto_update_tests.py +++ b/auto_update_tests.py @@ -27,18 +27,17 @@ for t in sorted(os.listdir('test')): open(t, 'w').write(actual) -for s in sorted(os.listdir(os.path.join('test', 'dot_s'))) + sorted(os.listdir(os.path.join('test', 'experimental', 'prototype-wasmate', 'test'))): - if not s.endswith('.s'): continue - if s in ['inline-asm.s', 'offset-folding.s']: continue - print '..', s - wasm = s.replace('.s', '.wast') - full = os.path.join('test', 'dot_s', s) - if not os.path.exists(full): - full = os.path.join('test', 'experimental', 'prototype-wasmate', 'test', s) - actual, err = subprocess.Popen([os.path.join('bin', 's2wasm'), full], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() - assert err == '', 'bad err:' + err - expected_file = os.path.join('test', 'dot_s', wasm) - open(expected_file, '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))): + if not s.endswith('.s'): continue + print '..', s + wasm = s.replace('.s', '.wast') + full = os.path.join('test', dot_s_dir, s) + actual, err = subprocess.Popen([os.path.join('bin', 's2wasm'), full], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() + assert err == '', 'bad err:' + err + + expected_file = os.path.join('test', dot_s_dir, wasm) + open(expected_file, 'w').write(actual) for wasm in ['min.wast', 'hello_world.wast', 'unit.wast', 'emcc_O2_hello_world.wast', 'emcc_hello_world.wast']: if wasm.endswith('.wast'): |