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

Test different CLI flags in reference tests #4264

Merged
merged 4 commits into from
Nov 12, 2024

Conversation

RunDevelopment
Copy link
Contributor

This PR adds the infrastructure for testing the code gen for different CLI flags, which is important for #4229 (and #4065). This is done using // FLAGS: --flag1 --flag2=value comments, which are passed directly to the CLI.

One hacky thing I had to do was to parse the --target option. This is necessary, because the target determines which files the reference test compares. E.g. bundler compares reference_test_bg.js while everything else compares reference_test.js (no _bg).

Copy link
Collaborator

@daxpedda daxpedda left a comment

Choose a reason for hiding this comment

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

Nice!

crates/cli/tests/reference.rs Outdated Show resolved Hide resolved
@daxpedda daxpedda added the waiting for author Waiting for author to respond label Nov 12, 2024
Co-authored-by: daxpedda <daxpedda@gmail.com>
@daxpedda daxpedda merged commit 2a1c7ac into rustwasm:main Nov 12, 2024
41 checks passed
@RunDevelopment RunDevelopment deleted the reference-test-targets branch November 13, 2024 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for author Waiting for author to respond
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants