aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell
diff options
context:
space:
mode:
authorGravatar Brian Silverman <bsilver16384@gmail.com>2016-01-21 11:52:07 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2016-01-21 16:22:11 +0000
commit45ca8d3873ffe0059de2bb5597667adb2781f625 (patch)
treeb916a4a60b48b077eceb8d7dc76da4b7a03b570b /src/test/shell
parent0338a35cbd1d55e24a97958da39e76615fe670aa (diff)
Fix extra_actions with sandboxing.
The ExtraAction code assumed that it didn't need to list the runfiles of its tools when running locally, but this isn't true with sandboxing. I don't think fixing this will negatively affect anybody's performance because they probably don't have any runfiles because they currently can't use them, unless they're running actions remotely in which case this change has no effect. -- Change-Id: Ibeb3db9d31321912a7163d1bce0edf5f6288ea3e Reviewed-on: https://bazel-review.googlesource.com/#/c/2520/ MOS_MIGRATED_REVID=112670586
Diffstat (limited to 'src/test/shell')
-rwxr-xr-xsrc/test/shell/bazel/bazel_rules_test.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/shell/bazel/bazel_rules_test.sh b/src/test/shell/bazel/bazel_rules_test.sh
index 7f18159997..2547ef57d2 100755
--- a/src/test/shell/bazel/bazel_rules_test.sh
+++ b/src/test/shell/bazel/bazel_rules_test.sh
@@ -63,6 +63,10 @@ function test_extra_action() {
# a program that parses the proto here.
cat > mypkg/echoer.sh <<EOF
#!/bin/bash
+if [[ ! -e \$0.runfiles/mypkg/runfile ]]; then
+ echo "Runfile not found" >&2
+ exit 1
+fi
echo EXTRA ACTION FILE: \$1
EOF
chmod +x mypkg/echoer.sh
@@ -75,6 +79,8 @@ public class Hello {
}
EOF
+ touch mypkg/runfile
+
cat > mypkg/BUILD <<EOF
package(default_visibility = ["//visibility:public"])
@@ -93,6 +99,7 @@ action_listener(
sh_binary(
name = "echoer",
srcs = ["echoer.sh"],
+ data = ["runfile"],
)
java_library(