aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/actions
diff options
context:
space:
mode:
authorGravatar Klaus Aehlig <aehlig@google.com>2016-08-24 09:22:45 +0000
committerGravatar John Cater <jcater@google.com>2016-08-24 20:00:03 +0000
commit833fa078e2ae5150e226f9251cec2ffee9e3a887 (patch)
treefa17615a3f769f030df889b61e8f7f9bbb1a8dee /src/test/java/com/google/devtools/build/lib/actions
parenta0b8aadac21b3917c0b382c818b2de93eeb31feb (diff)
Extend Action interface by client variables
As per our design on [Specifying environment variables](http://bazel.io/designs/2016/06/21/environment.html), actions may depend, in a controlled way, on the environment in which the Bazel client is invoked. Those environment variables are considered essential for the action, in the sense that it was to be repeated if either of them changes their value (note that other variables in client environment may well change without invalidating actions). Therefore, make the variables that need to be taken from the client environment part of the meta data for actions. -- Change-Id: I2ff6cf40b4ce8e0fea5c7e464f5f3b3e693025ac Reviewed-on: https://bazel-review.googlesource.com/#/c/5390 MOS_MIGRATED_REVID=131150211
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/actions')
-rw-r--r--src/test/java/com/google/devtools/build/lib/actions/ResourceManagerTest.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/actions/ResourceManagerTest.java b/src/test/java/com/google/devtools/build/lib/actions/ResourceManagerTest.java
index 4238ac0464..3e4ca4d511 100644
--- a/src/test/java/com/google/devtools/build/lib/actions/ResourceManagerTest.java
+++ b/src/test/java/com/google/devtools/build/lib/actions/ResourceManagerTest.java
@@ -22,17 +22,14 @@ import com.google.common.collect.ImmutableSet;
import com.google.common.eventbus.EventBus;
import com.google.devtools.build.lib.actions.ActionAnalysisMetadata.MiddlemanType;
import com.google.devtools.build.lib.testutil.TestThread;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
-
import javax.annotation.Nullable;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
*
@@ -368,6 +365,11 @@ public class ResourceManagerTest {
}
@Override
+ public Iterable<String> getClientEnvironmentVariables() {
+ throw new IllegalStateException();
+ }
+
+ @Override
public RunfilesSupplier getRunfilesSupplier() {
throw new IllegalStateException();
}