From fb687a622517244743d96c63cc2ca866f6abc390 Mon Sep 17 00:00:00 2001 From: UebelAndre Date: Wed, 29 Dec 2021 09:40:40 -0800 Subject: [PATCH 1/2] Updated tests --- test/test_env_launcher/BUILD.bazel | 4 ++-- test/test_env_launcher/tests/run.rs | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/test/test_env_launcher/BUILD.bazel b/test/test_env_launcher/BUILD.bazel index f7f20ffdef..f2fe852d8d 100644 --- a/test/test_env_launcher/BUILD.bazel +++ b/test/test_env_launcher/BUILD.bazel @@ -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)", }, ) diff --git a/test/test_env_launcher/tests/run.rs b/test/test_env_launcher/tests/run.rs index 01903cd2aa..7089671322 100644 --- a/test/test_env_launcher/tests/run.rs +++ b/test/test_env_launcher/tests/run.rs @@ -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(), @@ -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()); } From 24f6518e8086015288d5557422aae40c6e1e9ddd Mon Sep 17 00:00:00 2001 From: UebelAndre Date: Wed, 29 Dec 2021 09:15:31 -0800 Subject: [PATCH 2/2] Flip `incompatible_disable_custom_test_launcher` --- rust/settings/BUILD.bazel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/settings/BUILD.bazel b/rust/settings/BUILD.bazel index 8dfc181672..3a4bcd81d4 100644 --- a/rust/settings/BUILD.bazel +++ b/rust/settings/BUILD.bazel @@ -12,7 +12,7 @@ incompatible_flag( incompatible_flag( name = "incompatible_disable_custom_test_launcher", - build_setting_default = False, + build_setting_default = True, issue = "https://github.com/bazelbuild/rules_rust/issues/1069", )