aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/BuildView.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/BuildView.java63
1 files changed, 50 insertions, 13 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java b/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
index c788f56861..ce726dcbed 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
@@ -954,22 +954,59 @@ public class BuildView {
// For testing
@VisibleForTesting
- public Iterable<ConfiguredTarget> getDirectPrerequisitesForTesting(
- ExtendedEventHandler eventHandler, ConfiguredTarget ct,
+ public Collection<ConfiguredTarget> getDirectPrerequisitesForTesting(
+ ExtendedEventHandler eventHandler,
+ ConfiguredTarget ct,
BuildConfigurationCollection configurations)
- throws EvalException, InvalidConfigurationException,
- InterruptedException, InconsistentAspectOrderException {
+ throws EvalException, InvalidConfigurationException, InterruptedException,
+ InconsistentAspectOrderException {
return Collections2.transform(
- skyframeExecutor.getConfiguredTargetsForTesting(
- eventHandler,
- ct.getConfiguration(),
- ImmutableSet.copyOf(
- getDirectPrerequisiteDependenciesForTesting(
- eventHandler, ct, configurations, /*toolchainContext=*/ null)
- .values())),
+ getConfiguredTargetAndDataDirectPrerequisitesForTesting(eventHandler, ct, configurations),
ConfiguredTargetAndData::getConfiguredTarget);
}
+ // TODO(janakr): pass the configuration in as a parameter here and above.
+ @VisibleForTesting
+ public Collection<ConfiguredTargetAndData>
+ getConfiguredTargetAndDataDirectPrerequisitesForTesting(
+ ExtendedEventHandler eventHandler,
+ ConfiguredTarget ct,
+ BuildConfigurationCollection configurations)
+ throws EvalException, InvalidConfigurationException, InterruptedException,
+ InconsistentAspectOrderException {
+ return getConfiguredTargetAndDataDirectPrerequisitesForTesting(
+ eventHandler, ct, ct.getConfiguration(), configurations);
+ }
+
+ @VisibleForTesting
+ public Collection<ConfiguredTargetAndData>
+ getConfiguredTargetAndDataDirectPrerequisitesForTesting(
+ ExtendedEventHandler eventHandler,
+ ConfiguredTargetAndData ct,
+ BuildConfigurationCollection configurations)
+ throws EvalException, InvalidConfigurationException, InterruptedException,
+ InconsistentAspectOrderException {
+ return getConfiguredTargetAndDataDirectPrerequisitesForTesting(
+ eventHandler, ct.getConfiguredTarget(), ct.getConfiguration(), configurations);
+ }
+
+ private Collection<ConfiguredTargetAndData>
+ getConfiguredTargetAndDataDirectPrerequisitesForTesting(
+ ExtendedEventHandler eventHandler,
+ ConfiguredTarget ct,
+ BuildConfiguration configuration,
+ BuildConfigurationCollection configurations)
+ throws EvalException, InvalidConfigurationException, InterruptedException,
+ InconsistentAspectOrderException {
+ return skyframeExecutor.getConfiguredTargetsForTesting(
+ eventHandler,
+ configuration,
+ ImmutableSet.copyOf(
+ getDirectPrerequisiteDependenciesForTesting(
+ eventHandler, ct, configurations, /*toolchainContext=*/ null)
+ .values()));
+ }
+
@VisibleForTesting
public OrderedSetMultimap<Attribute, Dependency> getDirectPrerequisiteDependenciesForTesting(
final ExtendedEventHandler eventHandler,
@@ -1146,9 +1183,9 @@ public class BuildView {
}
@VisibleForTesting
- public ConfiguredTargetAndData getConfiguredTargetAndTargetForTesting(
+ public ConfiguredTargetAndData getConfiguredTargetAndDataForTesting(
ExtendedEventHandler eventHandler, Label label, BuildConfiguration config) {
- return skyframeExecutor.getConfiguredTargetAndTargetForTesting(eventHandler, label, config);
+ return skyframeExecutor.getConfiguredTargetAndDataForTesting(eventHandler, label, config);
}
/**