Description redacted. -- MOS_MIGRATED_REVID=99181437
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/RuleConfiguredTarget.java b/src/main/java/com/google/devtools/build/lib/analysis/RuleConfiguredTarget.java index ab90da5..6ba6f1e 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/RuleConfiguredTarget.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/RuleConfiguredTarget.java
@@ -201,6 +201,13 @@ public ImmutableCollection<String> getKeys() { return skylarkProviders.keySet(); } + + /** + * Returns a Skylark provider; "key" must be one from {@link #getKeys()}. + */ + public Object getValue(String key) { + return skylarkProviders.get(key); + } } @Override
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 45fe788..453815f 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
@@ -907,7 +907,7 @@ protected Artifact getIncludeArtifact(String packageRelativePath, String owner) { return getIncludeArtifact(packageRelativePath, makeLabelAndConfiguration(owner)); } - + /** * Gets a derived Artifact for testing in the subdirectory of the {@link * BuildConfiguration#getIncludeDirectory()} corresponding to the package of {@code owner}. @@ -919,7 +919,7 @@ targetConfig.getIncludeDirectory(), owner); } - + /** * @return a shared artifact at the binary-root relative path {@code rootRelativePath} owned by * {@code owner}. @@ -931,7 +931,7 @@ return getDerivedArtifact(new PathFragment(rootRelativePath), targetConfig.getBinDirectory(), new ConfiguredTargetKey(owner)); } - + protected Action getGeneratingActionForLabel(String label) throws Exception { return getGeneratingAction(getFileConfiguredTarget(label).getArtifact()); } @@ -1326,6 +1326,10 @@ StringUtil.joinEnglishList(ImmutableSet.copyOf(expected), "or", "'"), value); } + protected String getErrorMsgMandatoryProviderMissing(String offendingRule, String providerName) { + return String.format("'%s' does not have mandatory provider '%s'", offendingRule, providerName); + } + /** * A stub analysis environment. */ @@ -1456,7 +1460,7 @@ return artifact; } - + /** * Retrieves an instance of {@code PseudoAction} that is shadowed by an extra action * @param targetLabel Label of the target with an extra action