diff options
author | 2015-10-16 21:00:41 +0000 | |
---|---|---|
committer | 2015-10-19 08:20:43 +0000 | |
commit | b019e5ea0957ec9e0e90fa40a685078e3608a936 (patch) | |
tree | 368d1841a0c1401aecb97810fed5cdb57b8a4276 /src/test/java/com/google | |
parent | 7637f9cba731e1c93ad3be637f94612a581efe5e (diff) |
Trying again with checking for the presence of the "resources" attribute.
Change the resource dependency handling to separate between the transitive and direct resources from libraries.
This slightly increases the complexity of resource propagation. The initial algorithm was to simply merge all transitive ResourceContainers together with any new ResourceContainer and propagate them via the AndroidResourcesProvider. The new algorithm is encapsulated inside a new ResourceDependencies class which works as follows:
1. Collect resources from the deps into transitive and direct NestedSets
2. If a rule provides a ResourceContainer, merge the transitive and direct into a new transitive set
3. Export the provider
This results having a rule without resources "forward" the merged sets of transitive and direct resources to the next rule.
--
MOS_MIGRATED_REVID=105631635
Diffstat (limited to 'src/test/java/com/google')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/actions/CustomCommandLineTest.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/actions/CustomCommandLineTest.java b/src/test/java/com/google/devtools/build/lib/actions/CustomCommandLineTest.java index d94780f2ff..a61790d645 100644 --- a/src/test/java/com/google/devtools/build/lib/actions/CustomCommandLineTest.java +++ b/src/test/java/com/google/devtools/build/lib/actions/CustomCommandLineTest.java @@ -69,6 +69,13 @@ public class CustomCommandLineTest { } @Test + public void testArtifactJoinStringArgs() { + CustomCommandLine cl = CustomCommandLine.builder().addJoinStrings("--path", ":", + ImmutableList.of("foo", "bar")).build(); + assertEquals(ImmutableList.of("--path", "foo:bar"), cl.arguments()); + } + + @Test public void testArtifactExecPathArgs() { CustomCommandLine cl = CustomCommandLine.builder().addExecPath("--path", artifact1).build(); assertEquals(ImmutableList.of("--path", "dir/file1.txt"), cl.arguments()); |