wpt icon indicating copy to clipboard operation
wpt copied to clipboard

Add content shell support to wptrunner.

Open t-troebst opened this issue 2 years ago • 1 comments

This PR adds support for the Chromium content_shell in wptrunner. content_shell represents a minimal implementation of the content module and is what is currently tested against in the Chromium CI pipeline. We would like to start running wptrunner with content_shell in the pipeline as well.

Tests for content_shell are normally run through a very rudimentary protocol (see here) that uses stdout / stdin. The ContentShellBrowser relays the information using multiprocessing.Queues so that the executors can send commands to the process.

Currently, this supports ref tests, crash tests, and testharness.js tests (with the exception of testdriver.js).

t-troebst avatar Aug 02 '22 00:08 t-troebst

This change underwent some previous review in the Chromium project (here) with @WeizhongX @jonathan-j-lee.

t-troebst avatar Aug 02 '22 00:08 t-troebst

@foolip, @jgraham, a friendly ping...

WeizhongX avatar Aug 12 '22 17:08 WeizhongX

It looks like some mypy errors exist already in the repo and are causing unrelated failures in the tools/ unittests checks.

py310-mypy run-test: commands[0] | mypy --config-file=/home/test/web-platform-tests/tools/mypy.ini tools/
tools/wptrunner/wptrunner/tests/test_metadata.py:9: error: Function is missing a type annotation  [no-untyped-def]
tools/wptrunner/wptrunner/tests/test_metadata.py:19: error: Function is missing a type annotation  [no-untyped-def]
tools/wptrunner/wptrunner/tests/test_metadata.py:36: error: Function is missing a type annotation  [no-untyped-def]
tools/wptrunner/wptrunner/tests/test_metadata.py:42: error: Function is missing a type annotation  [no-untyped-def]

DanielRyanSmith avatar Aug 12 '22 17:08 DanielRyanSmith

Yes, this is unrelated to this change - just a missing mypy config line in a file that was added recently. I've created a PR to resolve it: https://github.com/web-platform-tests/wpt/pull/35456

t-troebst avatar Aug 12 '22 21:08 t-troebst