Bug 1446854 [wpt PR 9945] - Allow passing stability options through command line (Fixes #9877), a=testonly

Automatic update from web-platform-testsAllow passing stability options through command line (Fixes #9877) (#9945)

repeat_loop = --verify-repeat-loop
repeat_restart = --verify-repeat-restart
(disable) chaos_mode = --verify-no-chaos-mode
max_time = --verify-max-time
(disable) output_results = --verify-no-output-results

wpt-commits: 9b3bb0557064a04e5b611060070977e2951e0c89
wpt-pr: 9945
wpt-commits: 9b3bb0557064a04e5b611060070977e2951e0c89
wpt-pr: 9945
This commit is contained in:
Mariana Meireles 2018-04-09 17:19:06 +00:00 committed by James Graham
parent ca123f1eaa
commit e21c348905
2 changed files with 38 additions and 2 deletions

View File

@ -4,6 +4,7 @@ import os
import sys
from collections import OrderedDict
from distutils.spawn import find_executable
from datetime import datetime, timedelta
import config
import wpttest
@ -82,6 +83,36 @@ scheme host and port.""")
mode_group.add_argument("--verify-log-full", action="store_true",
default=False,
help="Output per-iteration test results when running verify")
mode_group.add_argument("--verify-repeat-loop", action="store",
default=10,
help="Number of iterations for a run that reloads each test without restart.",
type=int)
mode_group.add_argument("--verify-repeat-restart", action="store",
default=5,
help="Number of iterations, for a run that restarts the runner between each iteration",
type=int)
chaos_mode_group = mode_group.add_mutually_exclusive_group()
chaos_mode_group.add_argument("--verify-no-chaos-mode", action="store_false",
default=True,
dest="verify_chaos_mode",
help="Disable chaos mode when running on Firefox")
chaos_mode_group.add_argument("--verify-chaos-mode", action="store_true",
default=True,
dest="verify_chaos_mode",
help="Enable chaos mode when running on Firefox")
mode_group.add_argument("--verify-max-time", action="store",
default=None,
help="The maximum number of minutes for the job to run",
type=lambda x: timedelta(minutes=float(x)))
output_results_group = mode_group.add_mutually_exclusive_group()
output_results_group.add_argument("--verify-no-output-results", action="store_false",
dest="verify_output_results",
default=True,
help="Prints individuals test results and messages")
output_results_group.add_argument("--verify-output-results", action="store_true",
dest="verify_output_results",
default=True,
help="Disable printing individuals test results and messages")
test_selection_group = parser.add_argument_group("Test Selection")
test_selection_group.add_argument("--test-types", action="store",

View File

@ -288,8 +288,13 @@ def run_tests(config, test_paths, product, **kwargs):
def check_stability(**kwargs):
import stability
return stability.check_stability(logger, **kwargs)
return stability.check_stability(logger,
max_time=kwargs['verify_max_time'],
chaos_mode=kwargs['verify_chaos_mode'],
repeat_loop=kwargs['verify_repeat_loop'],
repeat_restart=kwargs['verify_repeat_restart'],
output_results=kwargs['verify_output_results'],
**kwargs)
def start(**kwargs):
if kwargs["list_test_groups"]: