diff options
author | 2018-03-21 15:50:39 -0700 | |
---|---|---|
committer | 2018-03-21 15:52:35 -0700 | |
commit | 0f5679ef95611e457a6e39313cf88feac8b2278f (patch) | |
tree | aabde122dacbf4982edd470089c3335b29c4505e /src/test/shell/bazel/bazel_test_test.sh | |
parent | 9c4cecde70df9b532612d0be295ad27581c4c3a6 (diff) |
Use PATH and LD_LIBRARY_PATH from the client's environment if possible
This is technically an incompatible change, but I think it's unlikely to affect a lot of users. Note that this change leaves out Windows, where we set the PATH to the server env PATH plus the MSYS root determined from the shell path.
This is a cleanup, and it also makes unknown commit slightly safer.
PiperOrigin-RevId: 189981959
Diffstat (limited to 'src/test/shell/bazel/bazel_test_test.sh')
-rwxr-xr-x | src/test/shell/bazel/bazel_test_test.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/test/shell/bazel/bazel_test_test.sh b/src/test/shell/bazel/bazel_test_test.sh index 3096b6403a..7b1f81a721 100755 --- a/src/test/shell/bazel/bazel_test_test.sh +++ b/src/test/shell/bazel/bazel_test_test.sh @@ -198,7 +198,12 @@ EOF # We don't just use the local PATH, but use the test's PATH, which is more restrictive. PATH=$PATH:$PWD/scripts bazel --nomaster_bazelrc test //testing:t1 -s --run_under=hello \ - --test_output=all >& $TEST_log && fail "Expected failure" + --test_output=all --experimental_strict_action_env >& $TEST_log && fail "Expected failure" + + # With --noexperimental_strict_action_env, the local PATH is forwarded to the test. + PATH=$PATH:$PWD/scripts bazel test //testing:t1 -s --run_under=hello \ + --test_output=all --noexperimental_strict_action_env >& $TEST_log || fail "Expected success" + expect_log 'hello script!!! testing/t1' # We need to forward the PATH to make it work. PATH=$PATH:$PWD/scripts bazel test //testing:t1 -s --run_under=hello \ |