From e3229fe7c6001f13461772dc0f6393540392a158 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 21 Apr 2017 07:49:57 -0700 Subject: Extend time capping to run_tests_matrix scripts --- tools/run_tests/run_tests_matrix.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/run_tests/run_tests_matrix.py b/tools/run_tests/run_tests_matrix.py index 1da754d9f8..02f0ec5eff 100755 --- a/tools/run_tests/run_tests_matrix.py +++ b/tools/run_tests/run_tests_matrix.py @@ -377,6 +377,9 @@ if __name__ == "__main__": argp.add_argument('-n', '--runs_per_test', default=1, type=_runs_per_test_type, help='How many times to run each tests. >1 runs implies ' + 'omitting passing test from the output & reports.') + argp.add_argument('--max_time', default=-1, type=int, + help='Maximum amount of time to run tests for' + + '(other tests will be skipped)') args = argp.parse_args() extra_args = [] @@ -388,6 +391,8 @@ if __name__ == "__main__": extra_args.append('-n') extra_args.append('%s' % args.runs_per_test) extra_args.append('--quiet_success') + if args.max_time > 0: + extra_args.extend(('--max_time', '%d' % args.max_time)) all_jobs = _create_test_jobs(extra_args=extra_args, inner_jobs=args.inner_jobs) + \ _create_portability_test_jobs(extra_args=extra_args, inner_jobs=args.inner_jobs) -- cgit v1.2.3