massa
massa copied to clipboard
CI not detecting errors in doc-tests triggered by the testing feature
Describe the bug
As mentioned here, it would seem that running cargo test
or cargo test --doc
misses checks that are called behind #[cfg(any(test, feature = "testing"))]
(Same behavior if doctest
is included in the any
To Reproduce Steps to reproduce the behavior:
- checkout this commit: 50557d4
- cd into
massa-consensus-exports
-
cargo test --doc
- no error -
cargo test -F testing --doc
- error raised - view the CI history to see that CI for commit 50557d4 passed all checks here
Expected behavior
ideally, cargo test --doc
runs code that matches the test cfg
practically, change CI to include the -F testing
arg when appropriate