There are no documentation that cargo currently does not tell build script if cfg!(test)
or not
#13294
Labels
A-build-scripts
Area: build.rs scripts
A-documenting-cargo-itself
Area: Cargo's documentation
A-environment-variables
Area: environment variables
S-accepted
Status: Issue or feature is accepted, and has a team member available to help mentor or review
In #4789, an member of the repository says "This is currently intentional behavior because build scripts don't have a "I'm running tests" mode." but it looks there are no documentation about that in cargo book.
https://github.com/rust-lang/cargo/blob/92395d90106b3b61bcb68bcf2069052c93771764/src/doc/src/reference/environment-variables.md#environment-variables-cargo-sets-for-build-scripts
https://github.com/rust-lang/cargo/blob/92395d90106b3b61bcb68bcf2069052c93771764/src/doc/src/reference/build-scripts.md
I think it's good to mention that in the cargo book.
The text was updated successfully, but these errors were encountered: