diff options
author | ulfjack <ulfjack@google.com> | 2018-05-17 07:46:47 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-05-17 07:48:10 -0700 |
commit | d1ec570fb6ef8d142b0cf381df008c0f209b57aa (patch) | |
tree | ec84868f78a2080556f1e6b56149bff4d283b166 /src/test/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionTest.java | |
parent | a61b53a8ef65881c6c4a69f16edc52ed7f1662a3 (diff) |
Rename CommandAction.getEnvironment, add AbstractAction.getEnvironment
This is a cleanup to clarify the code.
1. The getEnvironment method in the CommandAction interface does not have
access to the clientEnv, so it's return value is necessarily incomplete.
Rename to getIncompleteEnvironmentForTesting.
2. Add a final getEnvironment method to AbstractAction, which returns the
ActionEnvironment, which is intended to be a complete description of the
intended final environment of the action (technically, of any spawn running
within the action). This is not currently used, but is provided to prevent
action subclasses to add such a method (it may be used in the future).
PiperOrigin-RevId: 196991091
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionTest.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionTest.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionTest.java b/src/test/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionTest.java index 8aaefcc460..fda3b53507 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionTest.java @@ -281,7 +281,7 @@ public class CppLinkActionTest extends BuildViewTestCase { ImmutableList.<LibraryToLink>of(), featureConfiguration) .build(); - assertThat(linkAction.getEnvironment()).containsEntry("foo", "bar"); + assertThat(linkAction.getIncompleteEnvironmentForTesting()).containsEntry("foo", "bar"); } private enum NonStaticAttributes { |