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

POC for basic web platform test integration #2585

Merged
merged 7 commits into from
Oct 22, 2024
Merged

POC for basic web platform test integration #2585

merged 7 commits into from
Oct 22, 2024

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Aug 22, 2024

This is just a proof of concept to start working through what is necessary to integrate web platform tests into wd-tests.

There are some limitations to this approach...

  1. All module imports are evaluated outside of an IoContext, even if they are dynamic imports. This means that no test can schedule any actual i/o. Any test that depends on setTimeout, for instance, won't work with this pattern. This also means that none of the fetch tests would work under this pattern (EventSource, timers, Web Sockets, etc, all wouldn't be possible with this approach)
  2. The test harness messes with the global scope. Ideally we'd be running these things in something like a ShadowRealm ... otherwise there's always a possibility of the harness conflicting with the global scope, tho that is unlikely in practice

@jasnell jasnell force-pushed the jsnell/wip-wpt branch 2 times, most recently from 7c954b5 to e5803d7 Compare August 22, 2024 19:07
@npaun npaun marked this pull request as ready for review October 18, 2024 16:43
@npaun npaun requested a review from a team as a code owner October 18, 2024 16:43
@npaun npaun requested a review from a team as a code owner October 18, 2024 16:43
@npaun
Copy link
Member

npaun commented Oct 18, 2024

@jasnell @anonrig I think this might be almost ready to merge. I think I found a pretty elegant bazel solution.

@npaun npaun force-pushed the jsnell/wip-wpt branch 4 times, most recently from 83f80f2 to 26ec3fc Compare October 18, 2024 16:56
build/BUILD.wpt Outdated Show resolved Hide resolved
build/wpt_test.bzl Outdated Show resolved Hide resolved
@npaun npaun force-pushed the jsnell/wip-wpt branch 2 times, most recently from bbc4317 to 8c9251a Compare October 18, 2024 18:02
@npaun
Copy link
Member

npaun commented Oct 21, 2024

Hmm the checksum of the Github Release for WPT keeps changing...

So far for https://github.com/web-platform-tests/wpt/archive/refs/tags/merge_pr_48695.tar.gz I've seen:

sha256-Hxn/D6x6lI9ISlCQFq620sb8x9iXplVzXPV6zumX84A=
sha256-2qTT6fguxmM+8ND0AgIlysNkqRHzELEiaCqEo6Y3PrY=
sha256-W9YnJn4yn9LpOYB3oOx2aSaG88t6qqwiWDL7zsogGdc=

@npaun npaun force-pushed the jsnell/wip-wpt branch 3 times, most recently from 1318d1a to 59ce311 Compare October 21, 2024 22:01
@npaun npaun requested a review from anonrig October 22, 2024 14:19
@npaun npaun linked an issue Oct 22, 2024 that may be closed by this pull request
8 tasks
build/wpt_test.bzl Outdated Show resolved Hide resolved
@jasnell
Copy link
Member Author

jasnell commented Oct 22, 2024

LGTM but I'm unable to approve the PR officially since I'm the original author

@npaun npaun merged commit 98ed1ab into main Oct 22, 2024
13 checks passed
@npaun npaun deleted the jsnell/wip-wpt branch October 22, 2024 17:44
@npaun npaun mentioned this pull request Oct 22, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Web Platform Tests
4 participants