Skip to content

Commit

Permalink
Reintroduce --stability, now in wptrunner
Browse files Browse the repository at this point in the history
  • Loading branch information
gsnedders committed May 14, 2018
1 parent 65bcd92 commit 69b0d8c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
10 changes: 7 additions & 3 deletions tools/wptrunner/wptrunner/wptcommandline.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,13 @@ def create_parser(product_choices=None):
mode_group.add_argument("--list-tests", action="store_true",
default=False,
help="List all tests that will run")
mode_group.add_argument("--verify", action="store_true",
default=False,
help="Run a stability check on the selected tests")
stability_group = mode_group.add_mutually_exclusive_group()
stability_group.add_argument("--verify", action="store_true",
default=False,
help="Run a stability check on the selected tests")
stability_group.add_argument("--stability", action="store_true",
default=False,
help="(DEPRECATED) Run a basic stability check on the selected tests")
mode_group.add_argument("--verify-log-full", action="store_true",
default=False,
help="Output per-iteration test results when running verify")
Expand Down
9 changes: 8 additions & 1 deletion tools/wptrunner/wptrunner/wptrunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,13 @@ def run_tests(config, test_paths, product, **kwargs):

def check_stability(**kwargs):
import stability
if kwargs["stability"]:
kwargs['verify_max_time'] = None
kwargs['verify_chaos_mode'] = False
kwargs['verify_repeat_loop'] = 0
kwargs['verify_repeat_restart'] = 10 if kwargs['repeat'] == 1 else kwargs['repeat']
kwargs['verify_output_results'] = True

return stability.check_stability(logger,
max_time=kwargs['verify_max_time'],
chaos_mode=kwargs['verify_chaos_mode'],
Expand All @@ -317,7 +324,7 @@ def start(**kwargs):
list_disabled(**kwargs)
elif kwargs["list_tests"]:
list_tests(**kwargs)
elif kwargs["verify"]:
elif kwargs["verify"] or kwargs["stability"]:
check_stability(**kwargs)
else:
return not run_tests(**kwargs)
Expand Down

0 comments on commit 69b0d8c

Please sign in to comment.