diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-01-12 13:23:54 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-01-12 13:23:54 -0800 |
commit | c54dadc397030412b566bfa1e1d80eb65be0aa23 (patch) | |
tree | 44956259a59167c3c94d1c99cf16a8b4bce373d3 /check.py | |
parent | 2e5363210f7ef4861bf734e89fef96176b4157bc (diff) | |
parent | 7daceb70fd2b97751d47fa9b792a0ba7bb846284 (diff) | |
download | binaryen-c54dadc397030412b566bfa1e1d80eb65be0aa23.tar.gz binaryen-c54dadc397030412b566bfa1e1d80eb65be0aa23.tar.bz2 binaryen-c54dadc397030412b566bfa1e1d80eb65be0aa23.zip |
Merge pull request #98 from WebAssembly/wasm-as_testing
wasm-as testing
Diffstat (limited to 'check.py')
-rwxr-xr-x | check.py | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -25,6 +25,8 @@ for arg in sys.argv[1:]: interpreter = arg.split('=')[1] print '[ using wasm interpreter at "%s" ]' % interpreter assert os.path.exists(interpreter), 'interpreter not found' + elif arg == '--torture': + torture = True elif arg == '--no-torture': torture = False else: @@ -278,6 +280,16 @@ if torture: if unexpected_result_count: fail(unexpected_result_count, 0) +print '\n[ checking wasm-as testcases... ]\n' + +for wast in tests: + 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 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') + print '\n[ checking example testcases... ]\n' cmd = [os.environ.get('CXX') or 'g++', '-std=c++11', os.path.join('test', 'example', 'find_div0s.cpp'), '-Isrc', '-g', '-lsupport', '-Llib/.'] |