diff options
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java b/src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java index e3f69f50d6..a60b3ecdbe 100644 --- a/src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java +++ b/src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java @@ -124,7 +124,7 @@ import com.google.devtools.build.lib.rules.repository.RepositoryDelegatorFunctio import com.google.devtools.build.lib.skyframe.AspectValue; import com.google.devtools.build.lib.skyframe.BazelSkyframeExecutorConstants; import com.google.devtools.build.lib.skyframe.BuildConfigurationValue; -import com.google.devtools.build.lib.skyframe.ConfiguredTargetAndTarget; +import com.google.devtools.build.lib.skyframe.ConfiguredTargetAndData; import com.google.devtools.build.lib.skyframe.ConfiguredTargetKey; import com.google.devtools.build.lib.skyframe.DiffAwareness; import com.google.devtools.build.lib.skyframe.LegacyLoadingPhaseRunner; @@ -744,20 +744,19 @@ public abstract class BuildViewTestCase extends FoundationTestCase { } /** - * Returns a ConfiguredTargetAndTarget for the specified label, using the given build - * configuration. + * Returns a ConfiguredTargetAndData for the specified label, using the given build configuration. */ - protected ConfiguredTargetAndTarget getConfiguredTargetAndTarget( + protected ConfiguredTargetAndData getConfiguredTargetAndTarget( Label label, BuildConfiguration config) { return view.getConfiguredTargetAndTargetForTesting(reporter, label, config); } /** - * Returns the ConfiguredTargetAndTarget for the specified label. If the label corresponds to a + * Returns the ConfiguredTargetAndData for the specified label. If the label corresponds to a * target with a top-level configuration transition, that transition is applied to the given - * config in the ConfiguredTargetAndTarget's ConfiguredTarget. + * config in the ConfiguredTargetAndData's ConfiguredTarget. */ - public ConfiguredTargetAndTarget getConfiguredTargetAndTarget(String label) + public ConfiguredTargetAndData getConfiguredTargetAndTarget(String label) throws LabelSyntaxException { return getConfiguredTargetAndTarget(Label.parseAbsolute(label), targetConfig); } @@ -836,9 +835,9 @@ public abstract class BuildViewTestCase extends FoundationTestCase { protected ConfiguredTarget scratchConfiguredTarget( String packageName, String ruleName, BuildConfiguration config, String... lines) throws IOException, Exception { - ConfiguredTargetAndTarget ctat = + ConfiguredTargetAndData ctad = scratchConfiguredTargetAndTarget(packageName, ruleName, config, lines); - return ctat == null ? null : ctat.getConfiguredTarget(); + return ctad == null ? null : ctad.getConfiguredTarget(); } /** @@ -850,7 +849,7 @@ public abstract class BuildViewTestCase extends FoundationTestCase { * @return the configured tatarget and target instance for the created rule. * @throws Exception */ - protected ConfiguredTargetAndTarget scratchConfiguredTargetAndTarget( + protected ConfiguredTargetAndData scratchConfiguredTargetAndTarget( String packageName, String rulename, String... lines) throws Exception { return scratchConfiguredTargetAndTarget(packageName, rulename, targetConfig, lines); } @@ -862,11 +861,11 @@ public abstract class BuildViewTestCase extends FoundationTestCase { * @param ruleName the name of the rule. * @param config the configuration to use to construct the configured rule. * @param lines the text of the rule. - * @return the ConfiguredTargetAndTarget instance for the created rule. + * @return the ConfiguredTargetAndData instance for the created rule. * @throws IOException * @throws Exception */ - protected ConfiguredTargetAndTarget scratchConfiguredTargetAndTarget( + protected ConfiguredTargetAndData scratchConfiguredTargetAndTarget( String packageName, String ruleName, BuildConfiguration config, String... lines) throws Exception { Target rule = scratchRule(packageName, ruleName, lines); @@ -1344,10 +1343,10 @@ public abstract class BuildViewTestCase extends FoundationTestCase { } protected static ConfiguredAttributeMapper getMapperFromConfiguredTargetAndTarget( - ConfiguredTargetAndTarget ctat) { + ConfiguredTargetAndData ctad) { return ConfiguredAttributeMapper.of( - (Rule) ctat.getTarget(), - ((RuleConfiguredTarget) ctat.getConfiguredTarget()).getConfigConditions()); + (Rule) ctad.getTarget(), + ((RuleConfiguredTarget) ctad.getConfiguredTarget()).getConfigConditions()); } public static Label makeLabel(String label) { @@ -1580,13 +1579,13 @@ public abstract class BuildViewTestCase extends FoundationTestCase { * Returns an attribute value retriever for the given rule for the target configuration. */ protected AttributeMap attributes(RuleConfiguredTarget ct) { - ConfiguredTargetAndTarget ctat; + ConfiguredTargetAndData ctad; try { - ctat = getConfiguredTargetAndTarget(ct.getLabel().toString()); + ctad = getConfiguredTargetAndTarget(ct.getLabel().toString()); } catch (LabelSyntaxException e) { throw new RuntimeException(e); } - return getMapperFromConfiguredTargetAndTarget(ctat); + return getMapperFromConfiguredTargetAndTarget(ctad); } protected AttributeMap attributes(ConfiguredTarget rule) { |