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

Implement better support for debug and release running of snapshot tests that succesfully compile #6937

Open
ironcev opened this issue Feb 18, 2025 · 0 comments
Labels
team:compiler Compiler Team testing General testing

Comments

@ironcev
Copy link
Member

ironcev commented Feb 18, 2025

Snapshot test that successfully compile will have a different final line, e.g., either:

Finished debug [unoptimized + fuel] target(s) [32 B] in ???

or

Finished release [optimized + fuel] target(s) [32 B] in ???

depending if we compile the test project in debug or release build.

We need support for snapshot tests to be able to compare snapshots no matter if the test is executed in the debug or release mode.

The current workaround is to force such snapshot tests to always compile in release mode by adding cmds to the snapshot.toml:

cmds = ["forc build --path {root} --release"]
@ironcev ironcev added testing General testing team:compiler Compiler Team labels Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:compiler Compiler Team testing General testing
Projects
None yet
Development

No branches or pull requests

1 participant