diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-01-14 17:48:59 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-01-14 17:48:59 -0800 |
commit | 30abeaa9e2151cd5d7b0ad730ee26eec12d69636 (patch) | |
tree | 93794121d5512edb10bd3d4ee2682ca0e4b00047 /auto_update_tests.py | |
parent | 6431ed05813b76d583a7ca98bf193c66c834b993 (diff) | |
parent | 921c9d96698c9c515aa274eaeb42b8fd1c140abd (diff) | |
download | binaryen-30abeaa9e2151cd5d7b0ad730ee26eec12d69636.tar.gz binaryen-30abeaa9e2151cd5d7b0ad730ee26eec12d69636.tar.bz2 binaryen-30abeaa9e2151cd5d7b0ad730ee26eec12d69636.zip |
Merge pull request #100 from WebAssembly/wasm-dis
wasm-dis
Diffstat (limited to 'auto_update_tests.py')
-rwxr-xr-x | auto_update_tests.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/auto_update_tests.py b/auto_update_tests.py index 597bb5901..ee7d15d18 100755 --- a/auto_update_tests.py +++ b/auto_update_tests.py @@ -68,5 +68,23 @@ for t in sorted(os.listdir(os.path.join('test', 'passes'))): actual, err = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() open(os.path.join('test', 'passes', passname + '.txt'), 'w').write(actual) +print '\n[ checking binary format testcases... ]\n' + +for wast in sorted(os.listdir('test')): + if wast.endswith('.wast') and not wast in ['unit.wast']: # blacklist some known failures + cmd = [os.path.join('bin', 'wasm-as'), os.path.join('test', wast), '-o', 'a.wasm'] + print ' '.join(cmd) + if os.path.exists('a.wasm'): os.unlink('a.wasm') + subprocess.check_call(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + assert os.path.exists('a.wasm') + + cmd = [os.path.join('bin', 'wasm-dis'), 'a.wasm', '-o', 'a.wast'] + print ' '.join(cmd) + if os.path.exists('a.wast'): os.unlink('a.wast') + subprocess.check_call(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + assert os.path.exists('a.wast') + actual = open('a.wast').read() + open(os.path.join('test', wast + '.fromBinary'), 'w').write(actual) + print '\n[ success! ]' |