Closed
Description
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.