aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/skyframe
diff options
context:
space:
mode:
authorGravatar dslomov <dslomov@google.com>2017-12-13 05:55:07 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2017-12-13 05:56:34 -0800
commita3b8e3972379f7e32f7c72c298ee20d8127f9aff (patch)
treedc1a64ec5513b329e81d3bd631cf92c468c47228 /src/test/java/com/google/devtools/build/lib/skyframe
parent75eca48099370df836388a6afe0279d597673f33 (diff)
Implement --(no)expand_test_suites flag.
--noexpand_test_suites flag will suppress expansion of test_suite targets into constituent tests, so that command-line aspects can analyze test_suite targets. RELNOTES: Added --(no)expand_test_suites flag. PiperOrigin-RevId: 178892829
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/skyframe')
-rw-r--r--src/test/java/com/google/devtools/build/lib/skyframe/TargetPatternPhaseKeyTest.java33
1 files changed, 21 insertions, 12 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/TargetPatternPhaseKeyTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/TargetPatternPhaseKeyTest.java
index 70ba224165..e9243751e7 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/TargetPatternPhaseKeyTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/TargetPatternPhaseKeyTest.java
@@ -49,47 +49,56 @@ public class TargetPatternPhaseKeyTest {
.addEqualityGroup(of(ImmutableList.of("c"), ""))
.addEqualityGroup(of(ImmutableList.<String>of(), ""))
.addEqualityGroup(of(
- ImmutableList.<String>of(), "", ImmutableList.<String>of(), false, null,
+ ImmutableList.<String>of(), "", ImmutableList.<String>of(), false, true, null,
COMPILE_ONE_DEPENDENCY))
.addEqualityGroup(of(
- ImmutableList.<String>of(), "", ImmutableList.<String>of(), true, null,
+ ImmutableList.<String>of(), "", ImmutableList.<String>of(), false, false, null,
COMPILE_ONE_DEPENDENCY))
- .addEqualityGroup(of(
+ .addEqualityGroup(of(
+ ImmutableList.<String>of(), "", ImmutableList.<String>of(), true, true, null,
+ COMPILE_ONE_DEPENDENCY))
+ .addEqualityGroup(of(
+ ImmutableList.<String>of(), "", ImmutableList.<String>of(), true, false, null,
+ COMPILE_ONE_DEPENDENCY))
+ .addEqualityGroup(of(
ImmutableList.<String>of(), "", ImmutableList.<String>of(), false,
- emptyTestFilter(),
+ true, emptyTestFilter(),
BUILD_TESTS_ONLY))
.addEqualityGroup(of(
ImmutableList.<String>of(), "", ImmutableList.<String>of(), true,
- emptyTestFilter(),
+ true, emptyTestFilter(),
BUILD_TESTS_ONLY))
.addEqualityGroup(of(
ImmutableList.<String>of(), "", ImmutableList.<String>of(), false,
- emptyTestFilter(),
+ true, emptyTestFilter(),
DETERMINE_TESTS))
.addEqualityGroup(of(
ImmutableList.<String>of(), "", ImmutableList.<String>of(), true,
- emptyTestFilter(),
+ true, emptyTestFilter(),
DETERMINE_TESTS))
.addEqualityGroup(of(
- ImmutableList.<String>of(), "", ImmutableList.<String>of("a"), false, null))
+ ImmutableList.<String>of(), "", ImmutableList.<String>of("a"), false, true,
+ null))
.addEqualityGroup(of(
- ImmutableList.<String>of(), "", ImmutableList.<String>of("a"), true, null))
+ ImmutableList.<String>of(), "", ImmutableList.<String>of("a"), true, true,
+ null))
.testEquals();
}
private TargetPatternPhaseKey of(ImmutableList<String> targetPatterns, String offset,
ImmutableList<String> buildTagFilter,
- boolean includeManualTests, @Nullable TestFilter testFilter, Flag... flags) {
+ boolean includeManualTests, boolean expandTestSuites, @Nullable TestFilter testFilter,
+ Flag... flags) {
ImmutableSet<Flag> set = ImmutableSet.copyOf(flags);
boolean compileOneDependency = set.contains(Flag.COMPILE_ONE_DEPENDENCY);
boolean buildTestsOnly = set.contains(Flag.BUILD_TESTS_ONLY);
boolean determineTests = set.contains(Flag.DETERMINE_TESTS);
return new TargetPatternPhaseKey(targetPatterns, offset, compileOneDependency, buildTestsOnly,
- determineTests, buildTagFilter, includeManualTests, testFilter);
+ determineTests, buildTagFilter, includeManualTests, expandTestSuites, testFilter);
}
private TargetPatternPhaseKey of(ImmutableList<String> targetPatterns, String offset) {
- return of(targetPatterns, offset, ImmutableList.<String>of(), false, null);
+ return of(targetPatterns, offset, ImmutableList.<String>of(), false, true, null);
}
private TestFilter emptyTestFilter() {