Default to no-flakes, allow enabling them

pull/3542/head
Craig Tiller 9 years ago
parent d7e09c31e6
commit d4509a16b3
  1. 2
      tools/run_tests/jobset.py
  2. 11
      tools/run_tests/run_tests.py

@ -133,7 +133,7 @@ class JobSpec(object):
"""Specifies what to run for a job."""
def __init__(self, cmdline, shortname=None, environ=None, hash_targets=None,
cwd=None, shell=False, timeout_seconds=5*60, flake_retries=5):
cwd=None, shell=False, timeout_seconds=5*60, flake_retries=0):
"""
Arguments:
cmdline: a list of arguments to pass as the command line

@ -99,7 +99,8 @@ class SimpleConfig(object):
environ=actual_environ,
timeout_seconds=self.timeout_seconds,
hash_targets=hash_targets
if self.allow_hashing else None)
if self.allow_hashing else None,
flake_retries=5 if args.allow_flakes else 0)
# ValgrindConfig: compile with some CONFIG=config, but use valgrind to run
@ -117,7 +118,8 @@ class ValgrindConfig(object):
return jobset.JobSpec(cmdline=['valgrind', '--tool=%s' % self.tool] +
self.args + cmdline,
shortname='valgrind %s' % cmdline[0],
hash_targets=None)
hash_targets=None,
flake_retries=5 if args.allow_flakes else 0)
def get_c_tests(travis, test_lang) :
@ -555,6 +557,11 @@ argp.add_argument('--use_docker',
help="Run all the tests under docker. That provides " +
"additional isolation and prevents the need to installs " +
"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)")
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')

Loading…
Cancel
Save