aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar kchodorow <kchodorow@google.com>2017-05-04 20:42:52 +0200
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2017-05-04 23:06:12 +0200
commitd0242ce4a87929f2528f4602d0fb09d1ccfcea94 (patch)
tree9278cc722162918931e8d6bdfe7b8db7f162e46c
parentba51cda99733a9facb9479683755944229f63ee3 (diff)
Make symlinks consistent
PiperOrigin-RevId: 155105523
-rw-r--r--src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java5
-rwxr-xr-xsrc/test/shell/bazel/execroot_test.sh5
2 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java b/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java
index 997b9e7504..0d435f2b02 100644
--- a/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java
+++ b/src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java
@@ -359,10 +359,9 @@ public class ExecutionTool {
if (targetConfigurations.size() == 1) {
String productName = runtime.getProductName();
String dirName = env.getWorkspaceName();
- String workspaceName = analysisResult.getWorkspaceName();
OutputDirectoryLinksUtils.createOutputDirectoryLinks(
- dirName, env.getWorkspace(), env.getDirectories().getExecRoot(workspaceName),
- env.getDirectories().getOutputPath(workspaceName), getReporter(), targetConfiguration,
+ dirName, env.getWorkspace(), env.getDirectories().getExecRoot(),
+ env.getDirectories().getOutputPath(), getReporter(), targetConfiguration,
request.getBuildOptions().getSymlinkPrefix(productName), productName);
}
diff --git a/src/test/shell/bazel/execroot_test.sh b/src/test/shell/bazel/execroot_test.sh
index 4f64e09851..720230a119 100755
--- a/src/test/shell/bazel/execroot_test.sh
+++ b/src/test/shell/bazel/execroot_test.sh
@@ -38,7 +38,10 @@ genrule(
EOF
bazel build -s //dir:use-srcs &> $TEST_log || fail "expected success"
- test -e "$(bazel info execution_root)/../${ws_name}"
+ execroot="$(bazel info execution_root)"
+ test -e "$execroot/../${ws_name}"
+ ls -l bazel-out | tee out
+ assert_contains "$execroot/bazel-out" out
}
run_suite "execution root tests"