aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcFrameworkTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/rules/objc/ObjcFrameworkTest.java')
-rw-r--r--src/test/java/com/google/devtools/build/lib/rules/objc/ObjcFrameworkTest.java93
1 files changed, 0 insertions, 93 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcFrameworkTest.java b/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcFrameworkTest.java
index e4a9dded52..6e90760563 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcFrameworkTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcFrameworkTest.java
@@ -25,10 +25,7 @@ import static com.google.devtools.build.lib.rules.objc.ObjcProvider.WEAK_SDK_FRA
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.devtools.build.lib.analysis.ConfiguredTarget;
-import com.google.devtools.build.lib.analysis.actions.SpawnAction;
import com.google.devtools.build.lib.vfs.PathFragment;
-import com.google.devtools.build.xcode.bundlemerge.proto.BundleMergeProtos;
-import com.google.devtools.build.xcode.bundlemerge.proto.BundleMergeProtos.BundleFile;
import java.util.Set;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -226,94 +223,4 @@ public class ObjcFrameworkTest extends ObjcRuleTestCase {
" })",
")");
}
-
- @Test
- public void testDynamicFrameworkInFinalBundle() throws Exception {
- scratch.file("x/Foo.framework/Foo");
- scratch.file("x/Foo.framework/Info.plist");
- scratch.file("x/Foo.framework/Headers/Foo.h");
- scratch.file("x/Foo.framework/Resources/bar.png");
- scratch.file(
- "x/BUILD",
- "objc_framework(",
- " name = 'foo_framework',",
- " framework_imports = glob(['Foo.framework/**']),",
- " is_dynamic = 1,",
- ")",
- "",
- "objc_binary(",
- " name = 'bin',",
- " srcs = [ 'a.m' ],",
- " deps = [ ':foo_framework' ],",
- ")",
- "",
- "ios_application(",
- " name = 'x',",
- " binary = ':bin',",
- ")");
-
- BundleMergeProtos.Control mergeControl = bundleMergeControl("//x:x");
-
- assertThat(mergeControl.getBundleFileList())
- .containsAllOf(
- BundleFile.newBuilder()
- .setBundlePath("Frameworks/Foo.framework/Foo")
- .setSourceFile(getSourceArtifact("x/Foo.framework/Foo").getExecPathString())
- .setExternalFileAttribute(BundleableFile.EXECUTABLE_EXTERNAL_FILE_ATTRIBUTE)
- .build(),
- BundleFile.newBuilder()
- .setBundlePath("Frameworks/Foo.framework/Info.plist")
- .setSourceFile(getSourceArtifact("x/Foo.framework/Info.plist").getExecPathString())
- .setExternalFileAttribute(BundleableFile.EXECUTABLE_EXTERNAL_FILE_ATTRIBUTE)
- .build(),
- BundleFile.newBuilder()
- .setBundlePath("Frameworks/Foo.framework/Resources/bar.png")
- .setSourceFile(
- getSourceArtifact("x/Foo.framework/Resources/bar.png").getExecPathString())
- .setExternalFileAttribute(BundleableFile.DEFAULT_EXTERNAL_FILE_ATTRIBUTE)
- .build());
-
- assertThat(mergeControl.getBundleFileList())
- .doesNotContain(
- BundleFile.newBuilder()
- .setBundlePath("Frameworks/Foo.framework/Headers/Foo.h")
- .setSourceFile(
- getSourceArtifact("x/Foo.framework/Headers/Foo.h").getExecPathString())
- .setExternalFileAttribute(BundleableFile.DEFAULT_EXTERNAL_FILE_ATTRIBUTE)
- .build());
- }
-
- @Test
- public void testDynamicFrameworkSigned() throws Exception {
- useConfiguration("--ios_cpu=arm64");
-
- scratch.file("x/Foo.framework/Foo");
- scratch.file("x/Foo.framework/Info.plist");
- scratch.file("x/Foo.framework/Headers/Foo.h");
- scratch.file("x/Foo.framework/Resources/bar.png");
- scratch.file(
- "x/BUILD",
- "objc_framework(",
- " name = 'foo_framework',",
- " framework_imports = glob(['Foo.framework/**']),",
- " is_dynamic = 1,",
- ")",
- "",
- "objc_binary(",
- " name = 'bin',",
- " srcs = [ 'a.m' ],",
- " deps = [ ':foo_framework' ],",
- ")",
- "",
- "ios_application(",
- " name = 'x',",
- " binary = ':bin',",
- ")");
-
- SpawnAction signingAction = (SpawnAction) ipaGeneratingAction();
-
- assertThat(normalizeBashArgs(signingAction.getArguments()))
- .containsAllOf("--sign", "${t}/Payload/x.app/Frameworks/*", "--sign", "${t}/Payload/x.app")
- .inOrder();
- }
}