aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools
diff options
context:
space:
mode:
authorGravatar ccalvarin <ccalvarin@google.com>2017-10-10 13:50:15 +0200
committerGravatar Marcel Hlopko <hlopko@google.com>2017-10-11 09:59:55 +0200
commitca74482825e0c0ca5d119eceab74ba4292428557 (patch)
treec53085a1265c032107a52c3b179a87b6d6a77fa4 /src/test/java/com/google/devtools
parent9725c8458d31a769371c75121061c7755bbad9c9 (diff)
Clean up InvocationPolicy's use of OptionDescription.
OptionDescription is basically a hack to get the expansion data for options from outside the options parser, but it was being used at various points of invocation policy enforcement. In order to correctly track option origin, we only want to get this information once. Do it during the invocation policy expansion stage, not at enforcement, so that we track the information of the option's origin in the original invocation policy passed to the enforcer, not the expanded one. PiperOrigin-RevId: 171661669
Diffstat (limited to 'src/test/java/com/google/devtools')
-rw-r--r--src/test/java/com/google/devtools/common/options/InvocationPolicyEnforcerTestBase.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/test/java/com/google/devtools/common/options/InvocationPolicyEnforcerTestBase.java b/src/test/java/com/google/devtools/common/options/InvocationPolicyEnforcerTestBase.java
index a217c5083a..86f0112d59 100644
--- a/src/test/java/com/google/devtools/common/options/InvocationPolicyEnforcerTestBase.java
+++ b/src/test/java/com/google/devtools/common/options/InvocationPolicyEnforcerTestBase.java
@@ -21,6 +21,7 @@ import com.google.devtools.build.lib.runtime.proto.InvocationPolicyOuterClass.In
import java.io.ByteArrayOutputStream;
import java.util.Arrays;
import java.util.List;
+import java.util.logging.Level;
import org.junit.Before;
import org.junit.BeforeClass;
@@ -62,7 +63,8 @@ public class InvocationPolicyEnforcerTestBase {
return new InvocationPolicyEnforcer(
InvocationPolicyParser.parsePolicy(
- startupOptionsParser.getOptions(BlazeServerStartupOptions.class).invocationPolicy));
+ startupOptionsParser.getOptions(BlazeServerStartupOptions.class).invocationPolicy),
+ Level.INFO);
}
OptionsParser parser;