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

Generate Web Worker script for every test file #3415

Closed
wants to merge 1 commit into from

Conversation

kainino0x
Copy link
Collaborator

@kainino0x kainino0x commented Feb 16, 2024

This will be needed to launch Service Workers, which cannot be generated at runtime and cannot use dynamic import().

WIP. @beaufortfrancois

Issue: #3345


Requirements for PR author:

  • All missing test coverage is tracked with "TODO" or .unimplemented().
  • New helpers are /** documented */ and new helper files are found in helper_index.txt.
  • Test behaves as expected in a WebGPU implementation. (If not passing, explain above.)

Requirements for reviewer sign-off:

  • Tests are properly located in the test tree.
  • Test descriptions allow a reader to "read only the test plans and evaluate coverage completeness", and accurately reflect the test code.
  • Tests provide complete coverage (including validation control cases). Missing coverage MUST be covered by TODOs.
  • Helpers and types promote readability and maintainability.

When landing this PR, be sure to make any necessary issue status updates.

@kainino0x kainino0x mentioned this pull request Feb 16, 2024
7 tasks
This will be needed to launch Service Workers, which cannot be generated
at runtime and cannot use dynamic import().
@kainino0x kainino0x force-pushed the generated-webworkers branch from c2da262 to a96cd4e Compare February 16, 2024 19:32
import { g as oldG } from '${relPathToSuiteRoot}/${entry.file.join('/')}.spec.js';

// FIXME: Expose a proxied test interface. I think this can completely replace test_worker-worker.js
// (using this instead of that), but if not then hopefully it can at least share code with it.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may or may not replace test_worker-worker.js. It would be nice to avoid the duplicated functionality. But that one is a lot more flexible - it just creates one worker and runs tests on it, instead of having to manage one worker for every test file. But since we need to do that for Service Workers anyway, it's probably simplest to use the same setup and logic for all types of workers.


export const listing = ${JSON.stringify(listing, undefined, 2)};
`
);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the code above this point is the same as the old gen_listings.ts. Git didn't detect it as a rename because I added too much code.

@kainino0x
Copy link
Collaborator Author

This landed in #3419

@kainino0x kainino0x closed this Mar 29, 2024
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.

1 participant