diff options
author | 2017-07-15 00:07:43 +0200 | |
---|---|---|
committer | 2017-07-17 10:11:07 +0200 | |
commit | 4594b7fd6c2516341cdd6e57f9eaaf22cf691f95 (patch) | |
tree | 1cc76704955b1d0b4d595b1b94543e422ee6a219 /src/test/java/com/google/devtools/build/lib/rules/objc/ObjcProtoLibraryTest.java | |
parent | 2d6eba347df8f56b82bb23d343048755d3dfd773 (diff) |
AppleBinary and AppleStaticLibrary no longer propagate unwrapped ObjcProvider.
This will prevent dependencies on apple_binary and apple_static_library from objc_library and other lower-level rules.
RELNOTES: None.
PiperOrigin-RevId: 162013946
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/rules/objc/ObjcProtoLibraryTest.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/rules/objc/ObjcProtoLibraryTest.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcProtoLibraryTest.java b/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcProtoLibraryTest.java index a2689cd8fc..4a87049350 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcProtoLibraryTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcProtoLibraryTest.java @@ -679,12 +679,12 @@ public class ObjcProtoLibraryTest extends ObjcRuleTestCase { @Test public void testModulemapCreatedForNonLinkingTargets() throws Exception { - checkOnlyLibModuleMapsArePresentForTarget("//package:opl_protobuf"); + checkOnlyLibModuleMapsArePresentForTarget("//package:opl_protobuf", false); } @Test public void testModulemapNotCreatedForLinkingTargets() throws Exception { - checkOnlyLibModuleMapsArePresentForTarget("//package:opl_binary"); + checkOnlyLibModuleMapsArePresentForTarget("//package:opl_binary", true); } @Test @@ -760,7 +760,8 @@ public class ObjcProtoLibraryTest extends ObjcRuleTestCase { return Joiner.on('\n').join(Ordering.natural().immutableSortedCopy(elements)); } - private void checkOnlyLibModuleMapsArePresentForTarget(String target) throws Exception { + private void checkOnlyLibModuleMapsArePresentForTarget(String target, + boolean fromBinary) throws Exception { Artifact libModuleMap = getGenfilesArtifact( "opl_protobuf.modulemaps/module.modulemap", @@ -770,7 +771,11 @@ public class ObjcProtoLibraryTest extends ObjcRuleTestCase { "protobuf_lib.modulemaps/module.modulemap", getConfiguredTarget("//objcproto:protobuf_lib")); - ObjcProvider provider = providerForTarget(target); + ObjcProvider provider = fromBinary + ? getConfiguredTarget(target) + .get(AppleExecutableBinaryProvider.SKYLARK_CONSTRUCTOR) + .getDepsObjcProvider() + : providerForTarget(target); assertThat(Artifact.toRootRelativePaths(provider.get(ObjcProvider.MODULE_MAP).toSet())) .containsExactlyElementsIn( Artifact.toRootRelativePaths(ImmutableSet.of(libModuleMap, protolibModuleMap))); |