Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Add command line arg to allow no restart test runner on new test groups" #34478

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions tools/wptrunner/wptrunner/testrunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ class TestRunnerManager(threading.Thread):
def __init__(self, suite_name, index, test_type, test_queue, test_source_cls, browser_cls,
browser_kwargs, executor_cls, executor_kwargs, stop_flag, rerun=1,
pause_after_test=False, pause_on_unexpected=False, restart_on_unexpected=True,
debug_info=None, capture_stdio=True, restart_on_new_group=True, recording=None):
debug_info=None, capture_stdio=True, recording=None):
"""Thread that owns a single TestRunner process and any processes required
by the TestRunner (e.g. the Firefox binary).

Expand Down Expand Up @@ -332,7 +332,6 @@ def __init__(self, suite_name, index, test_type, test_queue, test_source_cls, br
self.browser = None

self.capture_stdio = capture_stdio
self.restart_on_new_group = restart_on_new_group

def run(self):
"""Main loop for the TestRunnerManager.
Expand Down Expand Up @@ -723,10 +722,10 @@ def after_test_end(self, test, restart, force_rerun=False, force_stop=False):
test, test_group, group_metadata = self.get_next_test()
if test is None:
return RunnerManagerState.stop(force_stop)
restart = (self.restart_on_new_group and
test_group is not self.state.test_group)
if restart:
if test_group is not self.state.test_group:
# We are starting a new group of tests, so force a restart
self.logger.info("Restarting browser for new test group")
restart = True
else:
test_group = self.state.test_group
group_metadata = self.state.group_metadata
Expand Down Expand Up @@ -864,7 +863,6 @@ def __init__(self, suite_name, size, test_source_cls, test_source_kwargs,
restart_on_unexpected=True,
debug_info=None,
capture_stdio=True,
restart_on_new_group=True,
recording=None):
self.suite_name = suite_name
self.size = size
Expand All @@ -880,7 +878,6 @@ def __init__(self, suite_name, size, test_source_cls, test_source_kwargs,
self.debug_info = debug_info
self.rerun = rerun
self.capture_stdio = capture_stdio
self.restart_on_new_group = restart_on_new_group
self.recording = recording
assert recording is not None

Expand Down Expand Up @@ -923,7 +920,6 @@ def run(self, test_type, tests):
self.restart_on_unexpected,
self.debug_info,
self.capture_stdio,
self.restart_on_new_group,
recording=self.recording)
manager.start()
self.pool.add(manager)
Expand Down
4 changes: 0 additions & 4 deletions tools/wptrunner/wptrunner/wptcommandline.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ def create_parser(product_choices=None):
default=True,
dest="fail_on_unexpected_pass",
help="Exit with status code 0 when all unexpected results are PASS")
parser.add_argument("--no-restart-on-new-group", action="store_false",
default=True,
dest="restart_on_new_group",
help="Don't restart test runner when start a new test group")

mode_group = parser.add_argument_group("Mode")
mode_group.add_argument("--list-test-groups", action="store_true",
Expand Down
1 change: 0 additions & 1 deletion tools/wptrunner/wptrunner/wptrunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ def run_test_iteration(test_status, test_loader, test_source_kwargs, test_source
run_test_kwargs["restart_on_unexpected"],
run_test_kwargs["debug_info"],
not run_test_kwargs["no_capture_stdio"],
run_test_kwargs["restart_on_new_group"],
recording=recording) as manager_group:
try:
manager_group.run(test_type, run_tests)
Expand Down