Commit 99eacd13 authored by dpranke@chromium.org's avatar dpranke@chromium.org

Change the default --retry-limit for telemetry*unittests.

Previously you had to pass the flag to get failures to be retried;
now we will retry failures by default if you run all of the tests
(i.e., do not specify any tests explicitly on the command line).

You can still pass --retry-limit=0 to turn off the retries and
--retry-limit=3 (or whatever) to force them on.

TBR=tonyg@chromium.org
BUG=402089

Review URL: https://codereview.chromium.org/468363002

Cr-Commit-Position: refs/heads/master@{#289554}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289554 0039d316-1c4b-4281-b951-d872f2087c98
parent 54a7196d
...@@ -126,8 +126,8 @@ class RunTestsCommand(command_line.OptparseCommand): ...@@ -126,8 +126,8 @@ class RunTestsCommand(command_line.OptparseCommand):
dest='run_disabled_tests', dest='run_disabled_tests',
action='store_true', default=False, action='store_true', default=False,
help='Ignore @Disabled and @Enabled restrictions.') help='Ignore @Disabled and @Enabled restrictions.')
parser.add_option('--retry-limit', type='int', default=0, parser.add_option('--retry-limit', type='int',
help='Retry each failure up to N times (default %default)' help='Retry each failure up to N times'
' to de-flake things.') ' to de-flake things.')
json_results.AddOptions(parser) json_results.AddOptions(parser)
...@@ -136,6 +136,11 @@ class RunTestsCommand(command_line.OptparseCommand): ...@@ -136,6 +136,11 @@ class RunTestsCommand(command_line.OptparseCommand):
if args.verbosity == 0: if args.verbosity == 0:
logging.getLogger().setLevel(logging.WARN) logging.getLogger().setLevel(logging.WARN)
# We retry failures by default unless we're running a list of tests
# explicitly.
if args.retry_limit is None and not args.positional_args:
args.retry_limit = 3
try: try:
possible_browser = browser_finder.FindBrowser(args) possible_browser = browser_finder.FindBrowser(args)
except browser_finder.BrowserFinderException, ex: except browser_finder.BrowserFinderException, ex:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment