aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/actions
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2015-10-15 16:21:25 +0000
committerGravatar Laszlo Csomor <laszlocsomor@google.com>2015-10-16 07:39:08 +0000
commit65425810207c9fd6892abfaa95da65e25db5e515 (patch)
treeceb20dee92f422c533a8ed632b92d626f44bb9b6 /src/test/java/com/google/devtools/build/lib/actions
parentc1caffaabd028493188b7e3419bedf3a9506dfee (diff)
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=105515074
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/actions')
-rw-r--r--src/test/java/com/google/devtools/build/lib/actions/CustomCommandLineTest.java7
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());