Skip to content

Refactor the WPT test runner to be a python test runner configuration #51854

Description

@joyeecheung

While working on the flakes I noticed that there are still some drawbacks with the current WPT test runner (common/wpt.js):

  1. To enable running tests in parallel the WPT test runner uses workers, which can be harder to debug especially when the use of inspector is needed to look into the JS land. If we just use the python runner, we get the parallelism for free, and debugging individual tests would be easier. We can use a fixture to set up the main context/harness and let the python runner preload that file before running the tests. To debug the test, just out/Release/node --inspect-brk -r test/common/wpt-fixture.js test/fixtures/wpt/... and connect to the inspector server with a client.
  2. The use of workers for parallelism also mean that we lack coverage of WPT running on the main thread (I've been bitten by this before when adding lazy loading of Web APIs the main context snapshot). If we use the python test runner to run the WPT directly, we can get coverage on both the main thread and the worker thread (via the custom test suite in the CI that uses the --worker switch)
  3. The status file for the current WPT runner doesn't allow conditions which is important for marking flakes on a specific platform. To add this to the JS-based WPT runner we need to reinvent the wheel again, and as far as I can tell we might as well just integrate the test runner into the existing python one and get a unified handling for flakes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.testIssues and PRs related to Node.js core tests and test infrastructure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions