aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/actions/ResourceManagerTest.java
diff options
context:
space:
mode:
authorGravatar Michajlo Matijkiw <michajlo@google.com>2015-03-12 19:43:20 +0000
committerGravatar Han-Wen Nienhuys <hanwen@google.com>2015-03-13 14:39:06 +0000
commit13459b4ee0e743da8f8416fc16bce64687f0c406 (patch)
tree2eb32207d9978f15aeeab9bfe048af3d0dd35859 /src/test/java/com/google/devtools/build/lib/actions/ResourceManagerTest.java
parent94588c2ceebca3328d3b84566306c91a8600fae6 (diff)
add baseline functionality for not saving unused artifacts
We define unused artifacts as those that aren't consumed by any action. This can be because an action produced more outputs than a dependent action needed, or because it's a top level artifact and we don't care about its contents, just that it was built without issue. Actions may prevent outputs from being discarded by declaring them as mandatory. This is particularly useful for test outputs. The motivation behind this change is to reduce storage overhead for things we can do without. It is worth noting this change doesn't cover all cases. In particular it has difficulty identifying *_binary artifacts as orphaned. This is due to the insertion of a virtual runfiles artifact which depends upon the rule's outputs. -- MOS_MIGRATED_REVID=88467504
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/actions/ResourceManagerTest.java')
-rw-r--r--src/test/java/com/google/devtools/build/lib/actions/ResourceManagerTest.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/actions/ResourceManagerTest.java b/src/test/java/com/google/devtools/build/lib/actions/ResourceManagerTest.java
index c8e0af4bee..8b2191e99a 100644
--- a/src/test/java/com/google/devtools/build/lib/actions/ResourceManagerTest.java
+++ b/src/test/java/com/google/devtools/build/lib/actions/ResourceManagerTest.java
@@ -431,5 +431,10 @@ public class ResourceManagerTest {
public String describeKey() {
throw new IllegalStateException();
}
+
+ @Override
+ public ImmutableSet<Artifact> getMandatoryOutputs() {
+ return ImmutableSet.of();
+ }
}
}