diff options
author | ulfjack <ulfjack@google.com> | 2018-06-07 07:05:37 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-07 07:07:11 -0700 |
commit | aa2ff99ac6fbdbd2efaa6af75de0a285dd1120ca (patch) | |
tree | f50782b4f1fb51e8711e8e7d480e2d85a331534c /src/main/java/com/google/devtools/build/lib/query2 | |
parent | 59fb8fabbc668107abbb039115e9d01fad100832 (diff) |
Fix bug in skyframe-based test-suite expansion
It was tracking filtered tests and then applying the filter at the next higher
level.
I also added a bunch of comments - we actually have four implementations of
test suite expansion, and they are not consistent. Sorry about that.
PiperOrigin-RevId: 199629485
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/query2')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/query2/engine/TestsFunction.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/query2/engine/TestsFunction.java b/src/main/java/com/google/devtools/build/lib/query2/engine/TestsFunction.java index 0331d480c5..7119cb47ad 100644 --- a/src/main/java/com/google/devtools/build/lib/query2/engine/TestsFunction.java +++ b/src/main/java/com/google/devtools/build/lib/query2/engine/TestsFunction.java @@ -85,6 +85,8 @@ public class TestsFunction implements QueryFunction { }); } + // TODO(ulfjack): This must match the code in TestTargetUtils. However, we don't currently want + // to depend on the packages library. Extract to a neutral place? /** * Decides whether to include a test in a test_suite or not. * @param testTags Collection of all tags exhibited by a given test. @@ -254,6 +256,7 @@ public class TestsFunction implements QueryFunction { Iterator<T> it = tests.iterator(); while (it.hasNext()) { T test = it.next(); + // TODO(ulfjack): This does not match the code used for TestSuite. List<String> testTags = new ArrayList<>(env.getAccessor().getStringListAttr(test, "tags")); testTags.add(env.getAccessor().getStringAttr(test, "size")); if (!includeTest(testTags, requiredTags, excludedTags)) { |