diff options
author | Carmi Grushko <carmi@google.com> | 2016-07-21 18:36:42 +0000 |
---|---|---|
committer | John Cater <jcater@google.com> | 2016-07-21 20:38:03 +0000 |
commit | 86b72161663131b04336a3ee037de5d98e31c8d4 (patch) | |
tree | 1decc3b8a456cf109d3d302cdc3d37330615dabc /src/test/java/com/google/devtools/build | |
parent | a3fa96dd6964afa9c722f42614220d0273078de3 (diff) |
When telling JavaBuilder what label produced a certain jar, also provide the Aspect's name that participated, if there is one.
RELNOTES:
--
MOS_MIGRATED_REVID=128085414
Diffstat (limited to 'src/test/java/com/google/devtools/build')
-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 f84fd302d9..bb630a3c55 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 @@ -92,6 +92,7 @@ import com.google.devtools.build.lib.events.EventHandler; import com.google.devtools.build.lib.events.StoredEventHandler; import com.google.devtools.build.lib.exec.ExecutionOptions; import com.google.devtools.build.lib.flags.InvocationPolicyEnforcer; +import com.google.devtools.build.lib.packages.AspectClass; import com.google.devtools.build.lib.packages.AspectParameters; import com.google.devtools.build.lib.packages.Attribute.ConfigurationTransition; import com.google.devtools.build.lib.packages.AttributeMap; @@ -137,9 +138,6 @@ import com.google.devtools.build.lib.vfs.PathFragment; import com.google.devtools.build.skyframe.SkyFunction; import com.google.devtools.common.options.Options; import com.google.devtools.common.options.OptionsParser; - -import org.junit.Before; - import java.io.ByteArrayOutputStream; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -152,6 +150,7 @@ import java.util.List; import java.util.Map; import java.util.Set; import java.util.UUID; +import org.junit.Before; /** * Common test code that creates a BuildView instance. @@ -976,32 +975,32 @@ public abstract class BuildViewTestCase extends FoundationTestCase { /** * Gets a derived Artifact for testing in the subdirectory of the {@link - * BuildConfiguration#getBinDirectory()} corresponding to the package of {@code owner}, - * where the given artifact belongs to the given ConfiguredTarget together with the given Aspect. - * So to specify a file foo/foo.o owned by target //foo:foo with an aspect from FooAspect, - * {@code packageRelativePath} should just be "foo.o", and aspectOfOwner should be - * FooAspect.class. This method is necessary when an Aspect of the target, not the target itself, - * is creating an Artifact. + * BuildConfiguration#getBinDirectory()} corresponding to the package of {@code owner}, where the + * given artifact belongs to the given ConfiguredTarget together with the given Aspect. So to + * specify a file foo/foo.o owned by target //foo:foo with an aspect from FooAspect, {@code + * packageRelativePath} should just be "foo.o", and aspectOfOwner should be FooAspect.class. This + * method is necessary when an Aspect of the target, not the target itself, is creating an + * Artifact. */ - protected Artifact getBinArtifact(String packageRelativePath, ConfiguredTarget owner, - NativeAspectClass creatingAspectFactory) { + protected Artifact getBinArtifact( + String packageRelativePath, ConfiguredTarget owner, AspectClass creatingAspectFactory) { return getBinArtifact( packageRelativePath, owner, creatingAspectFactory, AspectParameters.EMPTY); } /** * Gets a derived Artifact for testing in the subdirectory of the {@link - * BuildConfiguration#getBinDirectory()} corresponding to the package of {@code owner}, - * where the given artifact belongs to the given ConfiguredTarget together with the given Aspect. - * So to specify a file foo/foo.o owned by target //foo:foo with an aspect from FooAspect, - * {@code packageRelativePath} should just be "foo.o", and aspectOfOwner should be - * FooAspect.class. This method is necessary when an Aspect of the target, not the target itself, - * is creating an Artifact. + * BuildConfiguration#getBinDirectory()} corresponding to the package of {@code owner}, where the + * given artifact belongs to the given ConfiguredTarget together with the given Aspect. So to + * specify a file foo/foo.o owned by target //foo:foo with an aspect from FooAspect, {@code + * packageRelativePath} should just be "foo.o", and aspectOfOwner should be FooAspect.class. This + * method is necessary when an Aspect of the target, not the target itself, is creating an + * Artifact. */ protected Artifact getBinArtifact( String packageRelativePath, ConfiguredTarget owner, - NativeAspectClass creatingAspectFactory, + AspectClass creatingAspectFactory, AspectParameters parameters) { return getPackageRelativeDerivedArtifact( packageRelativePath, |