summaryrefslogtreecommitdiff
path: root/check.py
diff options
context:
space:
mode:
Diffstat (limited to 'check.py')
-rwxr-xr-xcheck.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/check.py b/check.py
index 00ab1c52e..7b1ec6835 100755
--- a/check.py
+++ b/check.py
@@ -259,7 +259,7 @@ for asm in tests:
# verify in wasm
if interpreter:
# remove imports, spec interpreter doesn't know what to do with them
- subprocess.check_call([os.path.join('bin', 'binaryen-shell'), '--remove-imports', '--print-after', os.path.join('test', wasm)], stdout=open('ztemp.wast', 'w'), stderr=subprocess.PIPE)
+ subprocess.check_call([os.path.join('bin', 'binaryen-shell'), '--remove-imports', '--print', os.path.join('test', wasm)], stdout=open('ztemp.wast', 'w'), stderr=subprocess.PIPE)
proc = subprocess.Popen([interpreter, 'ztemp.wast'], stderr=subprocess.PIPE)
out, err = proc.communicate()
if proc.returncode != 0:
@@ -286,7 +286,7 @@ for t in sorted(os.listdir(os.path.join('test', 'passes'))):
print '..', t
passname = os.path.basename(t).replace('.wast', '')
opt = '-O' if passname == 'O' else '--' + passname
- cmd = [os.path.join('bin', 'binaryen-shell'), '--print-after', opt, os.path.join('test', 'passes', t)]
+ cmd = [os.path.join('bin', 'binaryen-shell'), opt, os.path.join('test', 'passes', t), '--print']
print ' ', ' '.join(cmd)
actual, err = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
fail_if_not_identical(actual, open(os.path.join('test', 'passes', passname + '.txt')).read())
@@ -297,7 +297,7 @@ for t in tests:
if t.endswith('.wast') and not t.startswith('spec'):
print '..', t
t = os.path.join('test', t)
- cmd = [os.path.join('bin', 'binaryen-shell'), t, '--print-before']
+ cmd = [os.path.join('bin', 'binaryen-shell'), t, '--print']
print ' ', ' '.join(cmd)
actual, err = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
assert err.replace('printing before:', '').strip() == '', 'bad err:' + err
@@ -505,7 +505,11 @@ if has_vanilla_emcc and has_vanilla_llvm:
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/.']
+cmd = [os.environ.get('CXX') or 'g++', '-std=c++11',
+ os.path.join('test', 'example', 'find_div0s.cpp'),
+ os.path.join('src', 'pass.cpp'),
+ os.path.join('src', 'passes', 'Print.cpp'),
+ '-Isrc', '-g', '-lsupport', '-Llib/.']
if os.environ.get('COMPILER_FLAGS'):
for f in os.environ.get('COMPILER_FLAGS').split(' '):
cmd.append(f)