Open
Description
Problem
When the cargo test is executed, the binary built by the cargo build is overwritten as the result of the cargo test build.
├── Cargo.lock
├── Cargo.toml
└── test-bin
├── Cargo.toml
├── src
│ ├── lib.rs
│ └── main.rs
└── tests
└── xxx_test.rs
Steps
- cargo test
- cargo uild
- cargo test
Binaries will be overwritten constantly.
Possible Solution(s)
The cargo test should not modify the bin, but only the compiled test bin.
Notes
No response
Version
cargo 1.68.0 (115f34552 2023-02-26)
release: 1.68.0
commit-hash: 115f34552518a2f9b96d740192addbac1271e7e6
commit-date: 2023-02-26
host: x86_64-unknown-linux-gnu
libgit2: 1.5.0 (sys:0.16.0 vendored)
libcurl: 7.86.0-DEV (sys:0.4.59+curl-7.86.0 vendored ssl:OpenSSL/1.1.1q)
os: Linux [64-bit]