diff options
author | 2017-06-08 18:09:01 +0200 | |
---|---|---|
committer | 2017-06-09 10:23:04 +0200 | |
commit | d1c5329ba622b29afd3ab9f670fa17064d493bc0 (patch) | |
tree | ca0f459817b0ab744fd47b9ff3bcd17399688429 /src/main/java/com/google/devtools/build/lib/runtime/commands/InfoItem.java | |
parent | f7677ca2ab22b6f3e3b3c250fbc7b08c3bd29521 (diff) |
Track the test environment in Skyframe, like the action environment
Instead of passing a client env into the test strategies, use the same
mechansim as --action_env, by depending on the right set of Skyframe nodes that
correspond to client env entries.
PiperOrigin-RevId: 158401670
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime/commands/InfoItem.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/commands/InfoItem.java | 7 |
1 files changed, 6 insertions, 1 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 bf47b1487d..336342ba20 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 @@ -572,11 +572,16 @@ public abstract class InfoItem { public byte[] get(Supplier<BuildConfiguration> configurationSupplier, CommandEnvironment env) throws AbruptExitException { String result = ""; - for (Map.Entry<String, String> entry : env.getWhitelistedClientEnv().entrySet()) { + for (Map.Entry<String, String> entry : env.getWhitelistedActionEnv().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 += "build --action_env=" + entry.getKey() + "=" + entry.getValue() + "\n"; } + for (Map.Entry<String, String> entry : env.getWhitelistedTestEnv().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 += "build --test_env=" + entry.getKey() + "=" + entry.getValue() + "\n"; + } return print(result); } } |