diff options
author | Craig Tiller <ctiller@google.com> | 2017-04-21 07:49:57 -0700 |
---|---|---|
committer | Matt Kwong <mattkwong@google.com> | 2017-04-27 07:24:30 -0700 |
commit | e3229fe7c6001f13461772dc0f6393540392a158 (patch) | |
tree | 96ffa61a9c9eb824e47d29afb0af77d202027daa | |
parent | 6be939708977833104b7f81b7b52a02923ed3152 (diff) |
Extend time capping to run_tests_matrix scripts
-rwxr-xr-x | tools/run_tests/run_tests_matrix.py | 5 |
1 files changed, 5 insertions, 0 deletions
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) |