Run the debug CLI without Cargo loader paths
Some checks failed
Weekly OSV dependency audit / dependency-audit (push) Failing after 6s
Some checks failed
Weekly OSV dependency audit / dependency-audit (push) Failing after 6s
- Add the Rust target library directory to the Linux debug CLI rpath - Test that the built CLI runs without `LD_LIBRARY_PATH`
This commit is contained in:
@@ -8,6 +8,23 @@ fn cli(home: &std::path::Path, args: &[&str]) -> std::process::Output {
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
#[test]
|
||||
fn built_cli_runs_without_cargo_loader_paths() {
|
||||
let output = Command::new(env!("CARGO_BIN_EXE_bds-cli"))
|
||||
.env_remove("LD_LIBRARY_PATH")
|
||||
.arg("--help")
|
||||
.output()
|
||||
.unwrap();
|
||||
|
||||
assert!(
|
||||
output.status.success(),
|
||||
"{}",
|
||||
String::from_utf8_lossy(&output.stderr)
|
||||
);
|
||||
assert!(String::from_utf8_lossy(&output.stdout).contains("rebuild"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn process_exit_codes_help_and_shared_state_roundtrip() {
|
||||
let root = tempfile::tempdir().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user