aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Klaus Aehlig <aehlig@google.com>2016-10-06 13:10:32 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2016-10-07 08:04:16 +0000
commitd3a0d4f4fa6fd4254eb83eceba2069c8a42cd869 (patch)
tree71d21f2e5aa1bad8dc6ed3550ba0d117ef4e7370
parent299f57221bcd4b062f185ce1fc7840a8f29df217 (diff)
Fix info key client-env
...to produce 'build --action_env=' statements, not common ones. See also d59bcb633. -- Change-Id: Ib0fc75ff8991650c43dd72300b3d92a6986b1165 Reviewed-on: https://bazel-review.googlesource.com/#/c/6493 MOS_MIGRATED_REVID=135350639
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/commands/InfoItem.java2
-rwxr-xr-xsrc/test/shell/integration/action_env_test.sh12
2 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/InfoItem.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/InfoItem.java
index e8836e554f..579c3f4d5b 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/InfoItem.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/InfoItem.java
@@ -500,7 +500,7 @@ public abstract class InfoItem {
for (Map.Entry<String, String> entry : env.getWhitelistedClientEnv().entrySet()) {
// TODO(bazel-team): as the syntax of our rc-files does not support to express new-lines in
// values, we produce syntax errors if the value of the entry contains a newline character.
- result += "common --action_env=" + entry.getKey() + "=" + entry.getValue() + "\n";
+ result += "build --action_env=" + entry.getKey() + "=" + entry.getValue() + "\n";
}
return print(result);
}
diff --git a/src/test/shell/integration/action_env_test.sh b/src/test/shell/integration/action_env_test.sh
index 44fb1fd14c..6228247fce 100755
--- a/src/test/shell/integration/action_env_test.sh
+++ b/src/test/shell/integration/action_env_test.sh
@@ -123,9 +123,9 @@ function test_latest_wins_env() {
function test_env_freezing() {
cat > .${PRODUCT_NAME}rc <<EOF
-common --action_env=FREEZE_TEST_FOO
-common --action_env=FREEZE_TEST_BAR=is_fixed
-common --action_env=FREEZE_TEST_BAZ=will_be_overridden
+build --action_env=FREEZE_TEST_FOO
+build --action_env=FREEZE_TEST_BAR=is_fixed
+build --action_env=FREEZE_TEST_BAZ=will_be_overridden
build --action_env=FREEZE_TEST_BUILD
EOF
@@ -135,10 +135,10 @@ EOF
export FREEZE_TEST_BUILD=client_build
$bazel info --action_env=FREEZE_TEST_BAZ client-env > $TEST_log
- expect_log "common --action_env=FREEZE_TEST_FOO=client_foo"
+ expect_log "build --action_env=FREEZE_TEST_FOO=client_foo"
expect_not_log "FREEZE_TEST_BAR"
- expect_log "common --action_env=FREEZE_TEST_BAZ=client_baz"
- expect_log "common --action_env=FREEZE_TEST_BUILD=client_build"
+ expect_log "build --action_env=FREEZE_TEST_BAZ=client_baz"
+ expect_log "build --action_env=FREEZE_TEST_BUILD=client_build"
rm -f .${PRODUCT_NAME}rc
}