summaryrefslogtreecommitdiff
path: root/check.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-01-12 13:23:54 -0800
committerAlon Zakai <alonzakai@gmail.com>2016-01-12 13:23:54 -0800
commitc54dadc397030412b566bfa1e1d80eb65be0aa23 (patch)
tree44956259a59167c3c94d1c99cf16a8b4bce373d3 /check.py
parent2e5363210f7ef4861bf734e89fef96176b4157bc (diff)
parent7daceb70fd2b97751d47fa9b792a0ba7bb846284 (diff)
downloadbinaryen-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-xcheck.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/check.py b/check.py
index 94cd663d9..b11445bf4 100755
--- a/check.py
+++ b/check.py
@@ -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/.']