WebAssembly / WebAssembly/spec

Clean up JS/HTML-wrapped core test export for WPT

Open
#1,860 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
WebAssembly
Stars
3.5k
Forks
539
Avg merge
2d 1h
Merged PRs (30d)
13

Description

We've recently added automatic import of Wasm tests into the Web Platform Tests repo by using the HTML-wrapper output of the test/build.py script (see https://github.com/web-platform-tests/wpt/pull/49277).

There are several cleanups and improvements planned:

  1. Currently the testharness* files checked into the test harness directory are an out-of-date copy of the ones from upstream WPT, and are manually ignored by the import process. We should either delete them from the spec repo, or adjust test/build.py to not include them in the export.

  2. Currently we are using the existing HTML wrappers, but since wasm is available in workers and doesn't actually require HTML, we should probably switch to exporting the tests as any.js instead. We are already using these for the JS and Web API tests.

  3. As part of these, several things in that script could be cleaned up.
    Based on the conversation in https://github.com/WebAssembly/spec/issues/1687 it seems that neither Mozilla nor Google are using the existing JS or HTML export capabilities (and I would be interested in hearing from @kmiller68 or @ddegazio whether/how WebKit is using them). If none of the JS engine vendors are using this script for importing core tests into their own workflows, then we can simplify test/build.py to only support the use case of exporting tests to WPT (and possibly for some sort of convenient standalone testing of those exports? Not sure if that would be useful or not).

  4. Longer term we want to set up automatic export of tests from in-progress proposals too (marking them as "tentative"). I was imagining this would go via the testsuite repo, but it will be complicated by the fact that we also need updated spec interpreter or some other way to convert those tests to binary; so maybe we would need to go directly from proposal repos. Anyway, some way to get tests onto WPT before they go to phase 5 and get finally merged into the spec would be good.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading test/build.py and the test/harness directory, then compare the current HTML-wrapper export with the WPT any.js approach. Review issue 1687 and the linked WPT pull requests to determine which export use cases remain. Done means an agreed export scope and completed cleanup for the selected WPT workflow, with the longer-term proposal export direction documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, javascript, python, wasm
Domain
build-system, testing-qa, web-dev
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.