diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-01-11 17:16:57 -0500 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-01-11 17:16:57 -0500 |
commit | 4e98f922cb2d727a319f62d32e51afabb2e46d24 (patch) | |
tree | 507db7035fe0557431ff49f55016df1bedff8000 /check.py | |
parent | 75a562190a9f4588c8ffb19b8304f76c15a850c6 (diff) | |
parent | 873e5b0500a3edb07a09ed285ba8421be375cd25 (diff) | |
download | binaryen-4e98f922cb2d727a319f62d32e51afabb2e46d24.tar.gz binaryen-4e98f922cb2d727a319f62d32e51afabb2e46d24.tar.bz2 binaryen-4e98f922cb2d727a319f62d32e51afabb2e46d24.zip |
Merge pull request #91 from WebAssembly/sanitizers
Add Travis builds with sanitizers
Diffstat (limited to 'check.py')
-rwxr-xr-x | check.py | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -144,7 +144,9 @@ for t in tests: if t.endswith('.wast') and not t.startswith('spec'): print '..', t t = os.path.join('test', t) - actual, err = subprocess.Popen([os.path.join('bin', 'binaryen-shell'), t, '-print-before'], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() + cmd = [os.path.join('bin', 'binaryen-shell'), t, '-print-before'] + print ' ', ' '.join(cmd) + actual, err = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() assert err.replace('printing before:', '').strip() == '', 'bad err:' + err actual = actual.replace('printing before:\n', '') @@ -271,7 +273,12 @@ if unexpected_result_count: print '\n[ checking example testcases... ]\n' -subprocess.check_call([os.environ.get('CXX') or 'g++', '-std=c++11', os.path.join('test', 'example', 'find_div0s.cpp'), '-Isrc', '-g', '-lsupport', '-Llib/.']) +cmd = [os.environ.get('CXX') or 'g++', '-std=c++11', os.path.join('test', 'example', 'find_div0s.cpp'), '-Isrc', '-g', '-lsupport', '-Llib/.'] +if os.environ.get('COMPILER_FLAGS'): + for f in os.environ.get('COMPILER_FLAGS').split(' '): + cmd.append(f) +print ' '.join(cmd) +subprocess.check_call(cmd) actual = subprocess.Popen(['./a.out'], stdout=subprocess.PIPE).communicate()[0] expected = open(os.path.join('test', 'example', 'find_div0s.txt')).read() if actual != expected: |