diff options
author | Craig Tiller <ctiller@google.com> | 2016-10-17 14:31:44 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-10-17 14:31:44 -0700 |
commit | 654b242ce70afcf9fdab674cab9b71d8d3f02502 (patch) | |
tree | f463f15f28a23c0b94cd2c1e2a3250a416943ad1 /tools/run_tests/run_tests_matrix.py | |
parent | a628c84e86c0a545c7550e865a356ca4144047f8 (diff) | |
parent | 14c836fcd10e4f96ae1f4ac22fe43d42e2e293ba (diff) |
Merge branch 'direct-calls' into buffer_pools_for_realsies
Diffstat (limited to 'tools/run_tests/run_tests_matrix.py')
-rwxr-xr-x | tools/run_tests/run_tests_matrix.py | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/tools/run_tests/run_tests_matrix.py b/tools/run_tests/run_tests_matrix.py index 60c21a1e21..550dd10ea5 100755 --- a/tools/run_tests/run_tests_matrix.py +++ b/tools/run_tests/run_tests_matrix.py @@ -36,13 +36,14 @@ import multiprocessing import os import report_utils import sys +from filter_pull_request_tests import filter_tests _ROOT = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '../..')) os.chdir(_ROOT) # Set the timeout high to allow enough time for sanitizers and pre-building # clang docker. -_RUNTESTS_TIMEOUT = 2*60*60 +_RUNTESTS_TIMEOUT = 4*60*60 # Number of jobs assigned to each run_tests.py instance _INNER_JOBS = 2 @@ -231,6 +232,15 @@ argp.add_argument('--dry_run', action='store_const', const=True, help='Only print what would be run.') +argp.add_argument('--filter_pr_tests', + default=False, + action='store_const', + const=True, + help='Filters out tests irrelavant to pull request changes.') +argp.add_argument('--base_branch', + default='origin/master', + type=str, + help='Branch that pull request is requesting to merge into') args = argp.parse_args() extra_args = [] @@ -264,6 +274,19 @@ for job in jobs: print ' %s' % job.shortname print +if args.filter_pr_tests: + print 'IMPORTANT: Test filtering is not active; this is only for testing.' + relevant_jobs = filter_tests(jobs, args.base_branch) + # todo(mattkwong): add skipped tests to report.xml + print + if len(relevant_jobs) == len(jobs): + print '(TESTING) No tests will be skipped.' + else: + print '(TESTING) These tests will be skipped:' + for job in list(set(jobs) - set(relevant_jobs)): + print ' %s' % job.shortname + print + if args.dry_run: print '--dry_run was used, exiting' sys.exit(1) |