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

WPT harness: parse meta comments, raise error if config provided for nonexistent test #3556

Merged
merged 2 commits into from
Feb 18, 2025

Conversation

npaun
Copy link
Member

@npaun npaun commented Feb 14, 2025

  • Parse WPT meta comments found at the beginning of tests, in the form of "// META key=value"
  • Implement the "script" directive which includes another script
    • Because we're using unsafeEval to run the test code, I had to add a guard to make sure each script is included only once.
    • Also gets rid of our ad-hoc TestOptions.includeFile feature
  • Throw an error at the beginning of a test suite if a file listed in config wasn't actually discovered in the WPT repo. This way if you thought we were running a certain test but it wasn't working, there won't be a silent failure.

@npaun npaun requested review from jasnell and anonrig February 14, 2025 19:24
@npaun npaun requested review from a team as code owners February 14, 2025 19:24
@npaun npaun force-pushed the npaun/parse-wpt-meta branch 2 times, most recently from 7309ae5 to ffd0e08 Compare February 14, 2025 23:53
@npaun
Copy link
Member Author

npaun commented Feb 14, 2025

...

@npaun
Copy link
Member Author

npaun commented Feb 14, 2025

@anonrig Let me know if this makes things better for CLion too...

@npaun
Copy link
Member Author

npaun commented Feb 15, 2025

Damn. Still no windows. At this point the tsconfig is so simple.

build/wpt_test.bzl Outdated Show resolved Hide resolved
build/wpt_test.bzl Outdated Show resolved Hide resolved
src/wpt/BUILD.bazel Outdated Show resolved Hide resolved
src/wpt/harness/harness.ts Outdated Show resolved Hide resolved
src/wpt/harness/harness.ts Outdated Show resolved Hide resolved
src/wpt/urlpattern-test.ts Outdated Show resolved Hide resolved
@npaun npaun force-pushed the npaun/parse-wpt-meta branch from 669affd to 40a5103 Compare February 18, 2025 19:36
@npaun npaun force-pushed the npaun/parse-wpt-meta branch from 40a5103 to 2cab4bb Compare February 18, 2025 19:39
@anonrig
Copy link
Member

anonrig commented Feb 18, 2025

We need to fix Windows before landing this PR but otherwise it looks good to me

@npaun npaun force-pushed the npaun/parse-wpt-meta branch from 2cab4bb to 8885a02 Compare February 18, 2025 22:57
@npaun
Copy link
Member Author

npaun commented Feb 18, 2025

The internal build failures aren't related to anything in this PR; merging.

@npaun npaun merged commit 8cb554d into main Feb 18, 2025
16 of 17 checks passed
@npaun npaun deleted the npaun/parse-wpt-meta branch February 18, 2025 23:45
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.

2 participants