Demo repo: https://github.com/yshui/cargo-bug
This project uses a build script to compile a C file.
Steps to reproduce
-
Clone the repo. Run cargo build, and cargo test. Both commands should do some compiling, which is expected.
-
Change the C file, c/test.c. You can simply touch it.
-
Run cargo {build, test} again, in any order.
Expected behaviour
Both cargo build and cargo test rebuilds
Actual behaviour
Only the first run command rebuilds, the second one doesn't. Leaving either the test binary or the main binary out-of-date