diff options
author | 2017-03-17 13:02:03 -0700 | |
---|---|---|
committer | 2017-03-17 16:00:17 -0700 | |
commit | 9bc0d8200ec17ababe4c9cd6134a2cb7465365a6 (patch) | |
tree | 14ac57b2410205774b345de360b0886033d7d433 /tools/run_tests/run_tests_matrix.py | |
parent | cabb1517e5ac3cdbe59415678d4f0d284f9fabda (diff) | |
parent | 40a947ef93aeddca3b606613f628d4d09f094e77 (diff) |
Merge remote-tracking branch 'upstream/master' into cares_bazel_rule
Diffstat (limited to 'tools/run_tests/run_tests_matrix.py')
-rwxr-xr-x | tools/run_tests/run_tests_matrix.py | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/tools/run_tests/run_tests_matrix.py b/tools/run_tests/run_tests_matrix.py index 6a555fa361..d2de125ffb 100755 --- a/tools/run_tests/run_tests_matrix.py +++ b/tools/run_tests/run_tests_matrix.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python # Copyright 2015, Google Inc. # All rights reserved. # @@ -30,6 +30,8 @@ """Run test matrix.""" +from __future__ import print_function + import argparse import multiprocessing import os @@ -49,6 +51,9 @@ _RUNTESTS_TIMEOUT = 4*60*60 # Number of jobs assigned to each run_tests.py instance _DEFAULT_INNER_JOBS = 2 +# report suffix is important for reports to get picked up by internal CI +_REPORT_SUFFIX = 'sponge_log.xml' + def _docker_jobspec(name, runtests_args=[], runtests_envs={}, inner_jobs=_DEFAULT_INNER_JOBS): @@ -58,7 +63,7 @@ def _docker_jobspec(name, runtests_args=[], runtests_envs={}, '--use_docker', '-t', '-j', str(inner_jobs), - '-x', 'report_%s.xml' % name, + '-x', 'report_%s_%s' % (name, _REPORT_SUFFIX), '--report_suite_name', '%s' % name] + runtests_args, environ=runtests_envs, shortname='run_tests_%s' % name, @@ -74,10 +79,11 @@ def _workspace_jobspec(name, runtests_args=[], workspace_name=None, env = {'WORKSPACE_NAME': workspace_name} env.update(runtests_envs) test_job = jobset.JobSpec( - cmdline=['tools/run_tests/helper_scripts/run_tests_in_workspace.sh', + cmdline=['bash', + 'tools/run_tests/helper_scripts/run_tests_in_workspace.sh', '-t', '-j', str(inner_jobs), - '-x', '../report_%s.xml' % name, + '-x', '../report_%s_%s' % (name, _REPORT_SUFFIX), '--report_suite_name', '%s' % name] + runtests_args, environ=env, shortname='run_tests_%s' % name, @@ -95,7 +101,8 @@ def _generate_jobs(languages, configs, platforms, iomgr_platform = 'native', for config in configs: name = '%s_%s_%s_%s' % (language, platform, config, iomgr_platform) runtests_args = ['-l', language, - '-c', config] + '-c', config, + '--iomgr_platform', iomgr_platform] if arch or compiler: name += '_%s_%s' % (arch, compiler) runtests_args += ['--arch', arch, @@ -111,7 +118,7 @@ def _generate_jobs(languages, configs, platforms, iomgr_platform = 'native', job = _workspace_jobspec(name=name, runtests_args=runtests_args, runtests_envs=extra_envs, inner_jobs=inner_jobs) - job.labels = [platform, config, language] + labels + job.labels = [platform, config, language, iomgr_platform] + labels result.append(job) return result @@ -433,10 +440,10 @@ if __name__ == "__main__": maxjobs=args.jobs) # Merge skipped tests into results to show skipped tests on report.xml if skipped_jobs: - skipped_results = jobset.run(skipped_jobs, - skip_jobs=True) + ignored_num_skipped_failures, skipped_results = jobset.run( + skipped_jobs, skip_jobs=True) resultset.update(skipped_results) - report_utils.render_junit_xml_report(resultset, 'report.xml', + report_utils.render_junit_xml_report(resultset, 'report_%s' % _REPORT_SUFFIX, suite_name='aggregate_tests') if num_failures == 0: |