aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell/bazel/bazel_test_test.sh
diff options
context:
space:
mode:
authorGravatar ulfjack <ulfjack@google.com>2018-03-21 15:50:39 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-03-21 15:52:35 -0700
commit0f5679ef95611e457a6e39313cf88feac8b2278f (patch)
treeaabde122dacbf4982edd470089c3335b29c4505e /src/test/shell/bazel/bazel_test_test.sh
parent9c4cecde70df9b532612d0be295ad27581c4c3a6 (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-xsrc/test/shell/bazel/bazel_test_test.sh7
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 \