fix(tests): use CARGO_BIN_EXE for binary path in CLI tests
The CLI tests hardcoded target/debug/brewlog, but nix builds in release mode. Use Cargo's CARGO_BIN_EXE_brewlog env var which automatically points to the correct binary location. This enables running tests during nix build (removes doCheck = false).
This commit is contained in:
parent
6cd621e10a
commit
c7ea7420ae
1 changed files with 2 additions and 2 deletions
|
|
@ -22,8 +22,8 @@ static TEST_SERVER: Lazy<Mutex<Option<SharedServer>>> = Lazy::new(|| Mutex::new(
|
||||||
|
|
||||||
/// Get path to the brewlog binary
|
/// Get path to the brewlog binary
|
||||||
pub fn brewlog_bin() -> String {
|
pub fn brewlog_bin() -> String {
|
||||||
let manifest_dir = env!("CARGO_MANIFEST_DIR");
|
// Cargo sets this for integration tests - works for both debug and release
|
||||||
format!("{}/target/debug/brewlog", manifest_dir)
|
env!("CARGO_BIN_EXE_brewlog").to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get or start the shared test server - handles mutex poisoning gracefully
|
/// Get or start the shared test server - handles mutex poisoning gracefully
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue