summaryrefslogtreecommitdiff
path: root/check.py
diff options
context:
space:
mode:
Diffstat (limited to 'check.py')
-rwxr-xr-xcheck.py35
1 files changed, 20 insertions, 15 deletions
diff --git a/check.py b/check.py
index b8c136dfd..94cd663d9 100755
--- a/check.py
+++ b/check.py
@@ -18,12 +18,15 @@ import os, shutil, sys, subprocess, difflib, json, time
interpreter = None
requested = []
+torture = True
for arg in sys.argv[1:]:
if arg.startswith('--interpreter='):
interpreter = arg.split('=')[1]
print '[ using wasm interpreter at "%s" ]' % interpreter
assert os.path.exists(interpreter), 'interpreter not found'
+ elif arg == '--no-torture':
+ torture = False
else:
requested.append(arg)
@@ -256,22 +259,24 @@ for dot_s_dir in ['dot_s', 'llvm_autogenerated']:
actual, err = proc.communicate()
assert proc.returncode == 0, err
-print '\n[ checking torture testcases... ]\n'
-
-import test.waterfall.src.link_assembly_files as link_assembly_files
-s2wasm_torture_out = os.path.abspath(os.path.join('test', 's2wasm-torture-out'))
-if os.path.isdir(s2wasm_torture_out):
+if torture:
+
+ print '\n[ checking torture testcases... ]\n'
+
+ import test.waterfall.src.link_assembly_files as link_assembly_files
+ s2wasm_torture_out = os.path.abspath(os.path.join('test', 's2wasm-torture-out'))
+ if os.path.isdir(s2wasm_torture_out):
+ shutil.rmtree(s2wasm_torture_out)
+ os.mkdir(s2wasm_torture_out)
+ unexpected_result_count = link_assembly_files.run(
+ linker=os.path.abspath(os.path.join('bin', 's2wasm')),
+ files=os.path.abspath(os.path.join('test', 'torture-s', '*.s')),
+ fails=os.path.abspath(os.path.join('test', 's2wasm_known_gcc_test_failures.txt')),
+ out=s2wasm_torture_out)
+ assert os.path.isdir(s2wasm_torture_out), 'Expected output directory %s' % s2wasm_torture_out
shutil.rmtree(s2wasm_torture_out)
-os.mkdir(s2wasm_torture_out)
-unexpected_result_count = link_assembly_files.run(
- linker=os.path.abspath(os.path.join('bin', 's2wasm')),
- files=os.path.abspath(os.path.join('test', 'torture-s', '*.s')),
- fails=os.path.abspath(os.path.join('test', 's2wasm_known_gcc_test_failures.txt')),
- out=s2wasm_torture_out)
-assert os.path.isdir(s2wasm_torture_out), 'Expected output directory %s' % s2wasm_torture_out
-shutil.rmtree(s2wasm_torture_out)
-if unexpected_result_count:
- fail(unexpected_result_count, 0)
+ if unexpected_result_count:
+ fail(unexpected_result_count, 0)
print '\n[ checking example testcases... ]\n'