Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated tests to prep for incompatible_disable_custom_test_launcher fiip #1085

Merged
merged 1 commit into from
Jan 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/test_env_launcher/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rust_test(
edition = "2018",
env = {
"FERRIS_SAYS": "Hello fellow Rustaceans!",
"HELLO_WORLD_BIN_ROOTPATH": "$(rootpath :hello-world)",
"HELLO_WORLD_SRC_EXECPATH": "$(execpath :hello_world_main)",
"HELLO_WORLD_BIN": "$(rootpath :hello-world)",
"HELLO_WORLD_SRC": "$(rootpath :hello_world_main)",
},
)
8 changes: 3 additions & 5 deletions test/test_env_launcher/tests/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ fn run() {
);

// Test the behavior of `rootpath` and that a binary can be found relative to current_dir
let hello_world_bin =
std::path::PathBuf::from(std::env::var_os("HELLO_WORLD_BIN_ROOTPATH").unwrap());
let hello_world_bin = std::path::PathBuf::from(std::env::var_os("HELLO_WORLD_BIN").unwrap());

assert_eq!(
hello_world_bin.as_path(),
Expand All @@ -28,8 +27,7 @@ fn run() {
assert!(hello_world_bin.exists());

// Ensure `execpath` expanded variables map to real files and have absolute paths
let hello_world_src =
std::path::PathBuf::from(std::env::var("HELLO_WORLD_SRC_EXECPATH").unwrap());
assert!(hello_world_src.is_absolute());
let hello_world_src = std::path::PathBuf::from(std::env::var("HELLO_WORLD_SRC").unwrap());
assert!(!hello_world_bin.is_absolute());
assert!(hello_world_src.exists());
}