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

refactor(tests): Always use debug in tests #3542

Merged
merged 6 commits into from
Dec 1, 2023
Merged

Conversation

thecaralice
Copy link
Contributor

@thecaralice thecaralice commented Nov 29, 2023

Previously cfg!(any(feature="debug", debug_assertions)) was equivalent to cfg!(debug_assertions), since debug does not exist, which caused tests to assert different things depending on --release flag.
Since there is close to no reason to run a dozen different things only for panic handler to ignore any panic payload and assert that it returns "no info", now the used-to-be-debug behavior is the default and the only one in tests.

Related: #3470

Previously `cfg!(any(feature="debug", debug_assertions))`
was equivalent to `cfg!(debug_assertions)`.
Now test code relies on `debug` feature for panic messages.
@thecaralice thecaralice added A0-pleasereview PR is ready to be reviewed by the team P1-asap High priority D4-test Autotests, and examples E2-forcemacos Force CI to run macOS build in PR labels Nov 30, 2023
@thecaralice thecaralice requested a review from breathx November 30, 2023 00:32
pallets/gear/src/tests.rs Outdated Show resolved Hide resolved
pallets/gear/Cargo.toml Outdated Show resolved Hide resolved
pallets/gear/Cargo.toml Outdated Show resolved Hide resolved
@thecaralice thecaralice changed the title refactor(tests): Create an actual debug feature refactor(tests): Always use debug in tests Nov 30, 2023
@thecaralice thecaralice removed the E2-forcemacos Force CI to run macOS build in PR label Dec 1, 2023
@thecaralice thecaralice merged commit b46adb6 into master Dec 1, 2023
10 checks passed
@thecaralice thecaralice deleted the ac/fix-macos-tests branch December 1, 2023 16:49
@thecaralice thecaralice restored the ac/fix-macos-tests branch January 7, 2024 10:40
@thecaralice thecaralice deleted the ac/fix-macos-tests branch January 31, 2024 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A0-pleasereview PR is ready to be reviewed by the team D4-test Autotests, and examples P1-asap High priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants