Skip to content

Simplify JS-API test syncing #2130

@eqrion

Description

@eqrion

The JS-API testing situation is complicated. We've got diverging copies in spec/proposals and WPT. I'd like to simplify this to make contributing new tests easier.

Here's my understanding:

  1. We have JS-API tests in test/js-api of this repo. These are just WPTs and use the same harness setup.
  2. Proposals add their own JS-API tests to their forks of this repo.
  3. The web-platform-test repo has copies of the tests from the spec and proposal repos in tests/wasm/jsapi.
  4. Right now there is no automation between any of these repos, and so of course they've diverged over time.
    a. Spec contains about 7 tests that have never been pushed to WPT
    b. WPT has 'tentative' tests from the various proposals that are not yet in spec (this is expected)
    c. WPT has 4 non-tentative tests that have never been pushed to spec (this is not expected)
    d. Older proposals are also stale and have diverging harnesses and other infrastructure (like wasm module builder).

The core issue is that there's no canonical repo to prevent divergence over time.

Here are the two options I can think of:

1. Make 'spec' repo canonical

New JS-API tests must land in 'spec' first. We then automate a sync from 'spec' to 'wpt'.

This solves the divergence problem for 'spec' but not for the proposal repos.

Maybe they continue to be manually pushed to WPT? And then when a proposal gets merged, we manually remove them from WPT and replace them with automatically synced version.

2. Make 'wpt' repo canonical.

New JS-API tests must land in 'WPT' first, including tentative ones.

We then automate a sync from 'wpt' to 'spec'. The sync process needs to filter out 'tentative' tests from other proposals.

We could also have an automated sync from 'wpt' to individual proposals that preserves the 'tentative' tests from their proposal (maybe use subfolders for this).

2.a And only have JS-API tests in 'wpt'

Go even further than option 2, and just drop the JS-API copies from spec/proposals. Only use the WPT repo for tests.

Firefox only uses the WPT repo. We never directly use the JS-API tests from the spec/proposal repos. Maybe other browsers are different?

This would let us get rid of any complicated syncing, and just have one canonical location.

I have a preference for option 2.a, but I'm interested in what others think.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions