Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Commit

Permalink
Set correct execroot for info
Browse files Browse the repository at this point in the history
Fixes bazelbuild#3055.

RELNOTES: `bazel info execution_root` returns the corrrect directory name
for the execution root.
PiperOrigin-RevId: 159701171
  • Loading branch information
kchodorow authored and philwo committed Jun 22, 2017
1 parent 29916a9 commit 8965981
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ public ExecutionRootInfoItem() {
public byte[] get(Supplier<BuildConfiguration> configurationSupplier, CommandEnvironment env)
throws AbruptExitException {
checkNotNull(env);
return print(env.getDirectories().getExecRoot());
return print(env.getDirectories().getExecRoot(
configurationSupplier.get().getMainRepositoryName()));
}
}

Expand Down
14 changes: 9 additions & 5 deletions src/test/shell/bazel/client_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ source "${CURRENT_DIR}/../integration_test_setup.sh" \
|| { echo "integration_test_setup.sh not found!" >&2; exit 1; }

function test_product_name_with_bazel_info() {
bazel info >& "$TEST_log" || fail "Expected zero exit"
cat > WORKSPACE <<EOF
workspace(name = 'blerp')
EOF
bazel info >& "$TEST_log" || fail "Expected zero exit"

expect_log "^bazel-bin:.*_bazel.*bazel-out.*bin\$"
expect_log "^bazel-genfiles:.*_bazel.*bazel-out.*genfiles\$"
expect_log "^bazel-testlogs:.*_bazel.*bazel-out.*testlogs\$"
expect_log "^output_path:.*_bazel.*bazel-out\$"
expect_log "^bazel-bin:.*_bazel.*bazel-out.*bin\$"
expect_log "^bazel-genfiles:.*_bazel.*bazel-out.*genfiles\$"
expect_log "^bazel-testlogs:.*_bazel.*bazel-out.*testlogs\$"
expect_log "^output_path:.*_bazel.*bazel-out\$"
expect_log "^execution_root:.*/execroot/blerp\$"
}

0 comments on commit 8965981

Please sign in to comment.