diff options
author | 2017-06-08 18:09:01 +0200 | |
---|---|---|
committer | 2017-06-09 10:23:04 +0200 | |
commit | d1c5329ba622b29afd3ab9f670fa17064d493bc0 (patch) | |
tree | ca0f459817b0ab744fd47b9ff3bcd17399688429 /src/test/java/com/google/devtools/build | |
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/test/java/com/google/devtools/build')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/actions/util/ActionsTestUtil.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/actions/util/ActionsTestUtil.java b/src/test/java/com/google/devtools/build/lib/actions/util/ActionsTestUtil.java index cbf98e12ea..6ff3e3bc21 100644 --- a/src/test/java/com/google/devtools/build/lib/actions/util/ActionsTestUtil.java +++ b/src/test/java/com/google/devtools/build/lib/actions/util/ActionsTestUtil.java @@ -91,12 +91,20 @@ public final class ActionsTestUtil { public static ActionExecutionContext createContext(Executor executor, FileOutErr fileOutErr, Path execRoot, MetadataHandler metadataHandler, @Nullable ActionGraph actionGraph) { + return createContext( + executor, fileOutErr, execRoot, metadataHandler, ImmutableMap.<String, String>of(), + actionGraph); + } + + public static ActionExecutionContext createContext(Executor executor, FileOutErr fileOutErr, + Path execRoot, MetadataHandler metadataHandler, Map<String, String> clientEnv, + @Nullable ActionGraph actionGraph) { return new ActionExecutionContext( executor, new SingleBuildFileCache(execRoot.getPathString(), execRoot.getFileSystem()), metadataHandler, fileOutErr, - ImmutableMap.<String, String>of(), + ImmutableMap.<String, String>copyOf(clientEnv), actionGraph == null ? createDummyArtifactExpander() : ActionInputHelper.actionGraphArtifactExpander(actionGraph)); |