diff options
author | Alistair Veitch <aveitch@google.com> | 2015-10-22 11:27:33 -0700 |
---|---|---|
committer | Alistair Veitch <aveitch@google.com> | 2015-10-22 11:27:33 -0700 |
commit | 5f42b67e1ec759faef14e65f460fb2aaa9a69bf2 (patch) | |
tree | 73304d259d8761d20f3d9538d11fb9537497748e /tools/run_tests/run_tests.py | |
parent | f5f720bd9fd486e5d0d03202bf886d145925e85d (diff) | |
parent | 1bc8fa7bf712cb49f74198270dd6b2537f798434 (diff) |
merge & resolve conflicts
Diffstat (limited to 'tools/run_tests/run_tests.py')
-rwxr-xr-x | tools/run_tests/run_tests.py | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 84262aa773..2170824caf 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -161,7 +161,7 @@ class CLanguage(object): if os.path.isfile(binary): out.append(config.job_spec([binary], [binary])) else: - print "\nWARNING: binary not found, skipping", binary + print '\nWARNING: binary not found, skipping', binary return sorted(out) def make_targets(self): @@ -516,7 +516,7 @@ def runs_per_test_type(arg_str): if n <= 0: raise ValueError return n except: - msg = "'{}' isn't a positive integer or 'inf'".format(arg_str) + msg = '\'{}\' is not a positive integer or \'inf\''.format(arg_str) raise argparse.ArgumentTypeError(msg) # parse command line @@ -555,14 +555,14 @@ argp.add_argument('--use_docker', default=False, action='store_const', const=True, - help="Run all the tests under docker. That provides " + - "additional isolation and prevents the need to install " + - "language specific prerequisites. Only available on Linux.") + help='Run all the tests under docker. That provides ' + + 'additional isolation and prevents the need to install ' + + 'language specific prerequisites. Only available on Linux.') argp.add_argument('--allow_flakes', default=False, action='store_const', const=True, - help="Allow flaky tests to show as passing (re-runs failed tests up to five times)") + help='Allow flaky tests to show as passing (re-runs failed tests up to five times)') argp.add_argument('-a', '--antagonists', default=0, type=int) argp.add_argument('-x', '--xml_report', default=None, type=str, help='Generates a JUnit-compatible XML report') @@ -578,7 +578,7 @@ if args.use_docker: time.sleep(5) child_argv = [ arg for arg in sys.argv if not arg == '--use_docker' ] - run_tests_cmd = 'tools/run_tests/run_tests.py %s' % " ".join(child_argv[1:]) + run_tests_cmd = 'tools/run_tests/run_tests.py %s' % ' '.join(child_argv[1:]) # TODO(jtattermusch): revisit if we need special handling for arch here # set arch command prefix in case we are working with different arch. @@ -625,9 +625,9 @@ if platform.system() == 'Windows': # better do parallel compilation # empirically /m:2 gives the best performance/price and should prevent # overloading the windows workers. - extra_args.extend(["/m:2"]) + extra_args.extend(['/m:2']) # disable PDB generation: it's broken, and we don't need it during CI - extra_args.extend(["/p:Jenkins=true"]) + extra_args.extend(['/p:Jenkins=true']) return [ jobset.JobSpec(['vsprojects\\build.bat', 'vsprojects\\%s.sln' % target, @@ -802,8 +802,10 @@ def _build_and_run( check_cancelled, newline_on_success, travis, cache, xml_report=None): """Do one pass of building & running tests.""" # build latest sequentially - if not jobset.run(build_steps, maxjobs=1, stop_on_failure=True, - newline_on_success=newline_on_success, travis=travis): + num_failures, _ = jobset.run( + build_steps, maxjobs=1, stop_on_failure=True, + newline_on_success=newline_on_success, travis=travis) + if num_failures: return 1 # start antagonists |