aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/runtime/AbstractCommandTest.java
diff options
context:
space:
mode:
authorGravatar ccalvarin <ccalvarin@google.com>2017-06-29 17:05:59 +0200
committerGravatar Marcel Hlopko <hlopko@google.com>2017-06-29 17:51:35 +0200
commit835e8e3722bea0621a900f91875d687f342b649a (patch)
tree143c4e49863c3105adbafef3affcd991eadcb5ff /src/test/java/com/google/devtools/build/lib/runtime/AbstractCommandTest.java
parent2e8be9f09906fe7d34465bcae2435ddea9a74baa (diff)
Explicitly state the default options categories for options used in blaze testing.
Unlike in the production flags, these flags are only used for internal testing. Tagged them as NO_OP instead of the default UNKNOWN to make it clear that we do not need these to become properly tagged. PiperOrigin-RevId: 160526472
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/runtime/AbstractCommandTest.java')
-rw-r--r--src/test/java/com/google/devtools/build/lib/runtime/AbstractCommandTest.java26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/runtime/AbstractCommandTest.java b/src/test/java/com/google/devtools/build/lib/runtime/AbstractCommandTest.java
index e2bc10b2b2..0d336d967b 100644
--- a/src/test/java/com/google/devtools/build/lib/runtime/AbstractCommandTest.java
+++ b/src/test/java/com/google/devtools/build/lib/runtime/AbstractCommandTest.java
@@ -20,9 +20,11 @@ import com.google.devtools.build.lib.analysis.ConfiguredRuleClassProvider;
import com.google.devtools.build.lib.testutil.TestConstants;
import com.google.devtools.build.lib.util.ExitCode;
import com.google.devtools.common.options.Option;
+import com.google.devtools.common.options.OptionDocumentationCategory;
import com.google.devtools.common.options.OptionsBase;
import com.google.devtools.common.options.OptionsParser;
import com.google.devtools.common.options.OptionsProvider;
+import com.google.devtools.common.options.proto.OptionFilters.OptionEffectTag;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -38,15 +40,33 @@ import org.junit.runners.JUnit4;
public class AbstractCommandTest {
public static class FooOptions extends OptionsBase {
- @Option(name = "foo", category = "one", defaultValue = "0")
+ @Option(
+ name = "foo",
+ category = "one",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.NO_OP},
+ defaultValue = "0"
+ )
public int foo;
}
public static class BarOptions extends OptionsBase {
- @Option(name = "bar", category = "two", defaultValue = "42")
+ @Option(
+ name = "bar",
+ category = "two",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.NO_OP},
+ defaultValue = "42"
+ )
public int foo;
- @Option(name = "baz", category = "one", defaultValue = "oops")
+ @Option(
+ name = "baz",
+ category = "one",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.NO_OP},
+ defaultValue = "oops"
+ )
public String baz;
}