def run_tests(tests, num_tests, prefix, options): # The jstests tasks runner requires the following options. The names are # taken from the jstests options processing code, which are frequently # subtly different from the options jit-tests expects. As such, we wrap # them here, as needed. AdaptorOptions = namedtuple("AdaptorOptions", [ "worker_count", "passthrough", "timeout", "output_fp", "hide_progress", "run_skipped", "show_cmd"]) shim_options = AdaptorOptions(options.max_jobs, False, options.timeout, sys.stdout, False, True, options.show_cmd) # The test runner wants the prefix as a static on the Test class. JitTest.js_cmd_prefix = prefix pb = create_progressbar(num_tests, options) gen = run_all_tests(tests, prefix, pb, shim_options) ok = process_test_results(gen, num_tests, pb, options) return ok
def run_tests_local(tests, num_tests, prefix, options, slog): # The jstests tasks runner requires the following options. The names are # taken from the jstests options processing code, which are frequently # subtly different from the options jit-tests expects. As such, we wrap # them here, as needed. AdaptorOptions = namedtuple("AdaptorOptions", [ "worker_count", "passthrough", "timeout", "output_fp", "hide_progress", "run_skipped", "show_cmd"]) shim_options = AdaptorOptions(options.max_jobs, False, options.timeout, sys.stdout, False, True, options.show_cmd) # The test runner wants the prefix as a static on the Test class. JitTest.js_cmd_prefix = prefix pb = create_progressbar(num_tests, options) gen = run_all_tests(tests, prefix, pb, shim_options) ok = process_test_results(gen, num_tests, pb, options, slog) return ok
def run_tests(tests, results): """Run the given tests, sending raw results to the given results accumulator.""" pb = None if not OPTIONS.hide_progress: try: from progressbar import ProgressBar pb = ProgressBar('', len(tests), 16) except ImportError: pass results.pb = pb try: results.finished = run_all_tests(tests, results, OPTIONS) except KeyboardInterrupt: results.finished = False if pb: pb.finish() if not OPTIONS.tinderbox: results.list()