diff options
author | Dan Gohman <sunfish@mozilla.com> | 2016-01-12 11:20:59 -0800 |
---|---|---|
committer | Dan Gohman <sunfish@mozilla.com> | 2016-01-12 11:20:59 -0800 |
commit | 3cb2281ac161edb08a2fd79cd66302caa330d583 (patch) | |
tree | 7251cbd89775ee3255f25d4d0f1e6e1eb5067c27 /check.py | |
parent | 686a8334090f57e1ba218e552819b3c6374059b5 (diff) | |
parent | c5913b6ab62bb2a638981344b9e10d8765f6c357 (diff) | |
download | binaryen-3cb2281ac161edb08a2fd79cd66302caa330d583.tar.gz binaryen-3cb2281ac161edb08a2fd79cd66302caa330d583.tar.bz2 binaryen-3cb2281ac161edb08a2fd79cd66302caa330d583.zip |
Merge pull request #97 from WebAssembly/cf-depths
Update tests for upstream changes.
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' |