diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-01-12 10:54:17 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-01-12 10:54:17 -0800 |
commit | c5913b6ab62bb2a638981344b9e10d8765f6c357 (patch) | |
tree | 7251cbd89775ee3255f25d4d0f1e6e1eb5067c27 /check.py | |
parent | e3e589f54b426ec057fdc1079b85a7b535b17206 (diff) | |
download | binaryen-c5913b6ab62bb2a638981344b9e10d8765f6c357.tar.gz binaryen-c5913b6ab62bb2a638981344b9e10d8765f6c357.tar.bz2 binaryen-c5913b6ab62bb2a638981344b9e10d8765f6c357.zip |
add option to run check without torture
Diffstat (limited to 'check.py')
-rwxr-xr-x | check.py | 35 |
1 files changed, 20 insertions, 15 deletions
@@ -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' |