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

[wptrunner] Stop the runner process before the browser #48030

Conversation

jonathan-j-lee
Copy link
Contributor

@jonathan-j-lee jonathan-j-lee commented Sep 7, 2024

... via a stop message that tells the runner to gracefully tear down
the protocol.

The `stop` state will `ensure_runner_stopped` soon after
`runner_teardown` anyway via `TestRunnerManager._cleanup_run_loop()`.
This could occur if `testrunner.TestRunner` encounters an error early.
... via a `stop` message that tells the runner to gracefully tear down
the protocol.
* For WebDriver-based executors, this will close the session
  appropriately [1].
* For `chromedriver` in particular, this will ensure some per-session
  `/tmp/.org.chromium.Chromium.*` temporary directories [2], which are
  currently leaked, are deleted.

Also, remove `browser.stop(force=True)` so that the `force_stop` setting
of the `stop` state is actually respected. (This really only makes a
difference for browser processes on POSIX platforms that don't respond
to SIGTERM, which are probably worth investigation anyway.)

[1]: https://www.w3.org/TR/webdriver/#delete-session
[2]: https://source.chromium.org/chromium/chromium/src/+/main:chrome/test/chromedriver/chrome/chrome_desktop_impl.cc;l=107-122;drc=b14c93608871784e41d6d40f1c5952cf24aa39db;bpv=0;bpt=0
@jonathan-j-lee jonathan-j-lee marked this pull request as ready for review September 7, 2024 04:08
@wpt-pr-bot wpt-pr-bot added infra wptrunner The automated test runner, commonly called through ./wpt run labels Sep 7, 2024
@jonathan-j-lee jonathan-j-lee merged commit d65cf80 into web-platform-tests:master Sep 10, 2024
31 of 33 checks passed
@jonathan-j-lee jonathan-j-lee deleted the wptrunner/close-wd-session branch September 10, 2024 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra wptrunner The automated test runner, commonly called through ./wpt run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants