diff options
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! ]' |