aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2017-10-20 22:58:24 +0200
committerGravatar Dmitry Lomov <dslomov@google.com>2017-10-23 17:16:14 +0200
commit539b22b15c0114402e52151f63a2c83c95010244 (patch)
treeb692ed84f349622d5532bada9cd9c7ea892c6c2b /src/test/java
parente1e7725abffdc8687fea03d1fe134a1819fb8f37 (diff)
Fix changes that broke resource filtering, and document related confusion
Recent changes: 1) Started passing all resources to processors, ignoring the filtered ResourceContainers, and 2) Started loading an unfiltered LocalResourceContainer into binary resource processing, in addition to the filtered container. Fix both of these. To fix the former, we need to split the misleadingly-named 'transitiveResourceRoots' (actually transitive resource and assets artifacts) into transitive resources and assets. Update resource filtering tests to catch bugs like these. Also, rename getters for resource containers to make clear that they are not getters for resources. Finally, document some weirdness and partially-completed migrations encountered as part of investigating these issues, and add appropriate TODOs and deprecation. RELNOTES: None PiperOrigin-RevId: 172929936
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java2
-rw-r--r--src/test/java/com/google/devtools/build/lib/rules/android/ResourceFilterTest.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java
index 2c7bb8d8e6..a271b49446 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java
@@ -1471,7 +1471,7 @@ public class AndroidBinaryTest extends AndroidBuildViewTestCase {
.containsExactly(matchingResource, unqualifiedResource);
assertThat(resourceInputPaths(dir, directResources))
- .containsAllOf(matchingResource, unqualifiedResource);
+ .containsExactly(matchingResource, unqualifiedResource);
String[] flagValues =
flagValue("--prefilteredResources", resourceArguments(directResources)).split(",");
diff --git a/src/test/java/com/google/devtools/build/lib/rules/android/ResourceFilterTest.java b/src/test/java/com/google/devtools/build/lib/rules/android/ResourceFilterTest.java
index 2fc4e372db..aff6556fae 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/android/ResourceFilterTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/android/ResourceFilterTest.java
@@ -54,7 +54,7 @@ public class ResourceFilterTest extends ResourceTestBase {
assertThat(
makeResourceFilter(
"en", "hdpi", FilterBehavior.FILTER_IN_ANALYSIS_WITH_DYNAMIC_CONFIGURATION)
- .filterDependencies(errorConsumer, resourceContainers))
+ .filterDependencyContainers(errorConsumer, resourceContainers))
.isSameAs(resourceContainers);
}