aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/ActionArtifactCycleReporter.java
diff options
context:
space:
mode:
authorGravatar janakr <janakr@google.com>2017-08-24 09:23:39 +0200
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2017-08-24 14:00:09 +0200
commita4634cfb8aa1ee6c6d4f304554ace8fe95782d67 (patch)
tree005568b14351899997a58a486e27720b456fbc24 /src/main/java/com/google/devtools/build/lib/skyframe/ActionArtifactCycleReporter.java
parent93fdf030042f1aa9f235e6d7c0cde79f02263c26 (diff)
Automated rollback of commit bb0aba3e91b603bf96d4e214a3886d1f47c3d90a.
*** Reason for rollback *** Publishing duplicate build events for tests. *** Original change description *** Request test artifacts to be built in parallel with running the test. In cases where not all test artifacts are needed to run the test, this allows for greater parallelism in the build. We need to inject the request for the test to be run into the TargetCompletion function, so that it can properly process any errors. Thanks to nharmata@ for suggesting this. MEMORY: One additional Skyframe node and 2 edges for each test to be run (sharded tests still only count as one). So with 500 test target... *** PiperOrigin-RevId: 166307568
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/ActionArtifactCycleReporter.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/ActionArtifactCycleReporter.java19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/ActionArtifactCycleReporter.java b/src/main/java/com/google/devtools/build/lib/skyframe/ActionArtifactCycleReporter.java
index 16977df4dd..8808252848 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/ActionArtifactCycleReporter.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/ActionArtifactCycleReporter.java
@@ -32,13 +32,11 @@ import com.google.devtools.build.skyframe.SkyKey;
*/
public class ActionArtifactCycleReporter extends AbstractLabelCycleReporter {
@SuppressWarnings("unchecked")
- private static final Predicate<SkyKey> IS_ARTIFACT_OR_ACTION_SKY_KEY =
- Predicates.or(
- SkyFunctions.isSkyFunction(SkyFunctions.ARTIFACT),
- SkyFunctions.isSkyFunction(SkyFunctions.ACTION_EXECUTION),
- SkyFunctions.isSkyFunction(SkyFunctions.TARGET_COMPLETION),
- SkyFunctions.isSkyFunction(SkyFunctions.TEST_COMPLETION),
- SkyFunctions.isSkyFunction(SkyFunctions.TEST_EXECUTION));
+ private static final Predicate<SkyKey> IS_ARTIFACT_OR_ACTION_SKY_KEY = Predicates.or(
+ SkyFunctions.isSkyFunction(SkyFunctions.ARTIFACT),
+ SkyFunctions.isSkyFunction(SkyFunctions.ACTION_EXECUTION),
+ SkyFunctions.isSkyFunction(SkyFunctions.TARGET_COMPLETION),
+ SkyFunctions.isSkyFunction(SkyFunctions.TEST_COMPLETION));
ActionArtifactCycleReporter(PackageProvider packageProvider) {
super(packageProvider);
@@ -60,10 +58,6 @@ public class ActionArtifactCycleReporter extends AbstractLabelCycleReporter {
} else if (arg instanceof TestCompletionKey
&& skyFunctionName.equals(SkyFunctions.TEST_COMPLETION)) {
return "test target: " + ((TestCompletionKey) arg).labelAndConfiguration().getLabel();
- } else if (arg instanceof TestExecutionFunction.TestExecutionKey
- && skyFunctionName.equals(SkyFunctions.TEST_EXECUTION)) {
- return "test target: "
- + ((TestExecutionFunction.TestExecutionKey) arg).getLabelAndConfiguration().getLabel();
}
throw new IllegalStateException(
"Argument is not Action, TargetCompletion, TestCompletion or OwnedArtifact: " + arg);
@@ -82,9 +76,6 @@ public class ActionArtifactCycleReporter extends AbstractLabelCycleReporter {
} else if (arg instanceof TestCompletionKey
&& key.functionName().equals(SkyFunctions.TEST_COMPLETION)) {
return ((TestCompletionKey) arg).labelAndConfiguration().getLabel();
- } else if (arg instanceof TestExecutionFunction.TestExecutionKey
- && key.functionName().equals(SkyFunctions.TEST_EXECUTION)) {
- return ((TestExecutionFunction.TestExecutionKey) arg).getLabelAndConfiguration().getLabel();
}
throw new IllegalStateException(
"Argument is not Action, TargetCompletion, TestCompletion or OwnedArtifact: " + arg);