Skip to content

refactor(tests): templating for p2 tests #750

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

Conversation

vados-cosmonic
Copy link
Collaborator

@vados-cosmonic vados-cosmonic commented Jun 11, 2025

There are a few changes in this PR, including:

  • Refactor of p2 component pulling & generation
  • Refactor of creation of p2 tests per-component

Running the generation has gone from ~10 seconds to ~2 in local testing, and we've removed the dep on wasm-tools in the environment (not sure why it was there, given we have access to wit-component)

@vados-cosmonic vados-cosmonic force-pushed the refactor(tests)=test-templating branch 2 times, most recently from 7c466cc to 5dbe122 Compare June 11, 2025 12:00
@andreiltd
Copy link
Member

This now looks so much better. Thank you!

@vados-cosmonic vados-cosmonic force-pushed the refactor(tests)=test-templating branch 9 times, most recently from 53a9d72 to 535b91b Compare June 13, 2025 07:17
@vados-cosmonic vados-cosmonic enabled auto-merge June 13, 2025 07:47
@vados-cosmonic vados-cosmonic force-pushed the refactor(tests)=test-templating branch 6 times, most recently from f33c109 to 511fa5a Compare June 13, 2025 13:14
@vados-cosmonic vados-cosmonic force-pushed the refactor(tests)=test-templating branch from bc90a2f to a2e76a0 Compare June 16, 2025 00:43
@vados-cosmonic vados-cosmonic disabled auto-merge June 16, 2025 03:43
@vados-cosmonic vados-cosmonic force-pushed the refactor(tests)=test-templating branch 3 times, most recently from 9b5d5cc to cd40236 Compare June 16, 2025 14:44
@vados-cosmonic vados-cosmonic force-pushed the refactor(tests)=test-templating branch 7 times, most recently from 15f9bb2 to 2648d44 Compare June 17, 2025 01:17
@vados-cosmonic vados-cosmonic enabled auto-merge June 17, 2025 01:18
@vados-cosmonic
Copy link
Collaborator Author

vados-cosmonic commented Jun 17, 2025

Note: test generation was moved into particular platform CI test jobs because the paths in generated tests (after the changes in this PR) were absolute and not platform-independent.

The idea was that it's better to have absolute paths in most places than relative ones that can make tests brittle, and since generating tests is much faster now (~10s -> ~2s), we can "just" generate them right before use on the appropriate platform.

@vados-cosmonic vados-cosmonic force-pushed the refactor(tests)=test-templating branch 4 times, most recently from 959c6b5 to 028f973 Compare June 17, 2025 02:18
Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
@vados-cosmonic vados-cosmonic force-pushed the refactor(tests)=test-templating branch 2 times, most recently from a762d6e to 3810eec Compare June 17, 2025 04:12
Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
@vados-cosmonic vados-cosmonic force-pushed the refactor(tests)=test-templating branch from 3810eec to f18b4f1 Compare June 17, 2025 04:21
Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
@vados-cosmonic vados-cosmonic added this pull request to the merge queue Jun 17, 2025
Merged via the queue into bytecodealliance:main with commit c864cef Jun 17, 2025
26 checks passed
@vados-cosmonic vados-cosmonic deleted the refactor(tests)=test-templating branch June 17, 2025 15:19
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