aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell
diff options
context:
space:
mode:
authorGravatar Dmitry Shevchenko <dmishe@google.com>2016-08-29 20:54:29 +0000
committerGravatar Klaus Aehlig <aehlig@google.com>2016-08-30 08:34:34 +0000
commit13c60d05942609e0979087bc9b33931de78bdd76 (patch)
treedf756ddadfb1bb5541283d37b498771adbee1d45 /src/test/shell
parentbdc0e54daaea322023a4c82bc24fe2e0d523d690 (diff)
Add support for watchOS in swift_library
-- MOS_MIGRATED_REVID=131631222
Diffstat (limited to 'src/test/shell')
-rwxr-xr-xsrc/test/shell/bazel/bazel_apple_test.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/test/shell/bazel/bazel_apple_test.sh b/src/test/shell/bazel/bazel_apple_test.sh
index 5f56934bfc..8495c15dba 100755
--- a/src/test/shell/bazel/bazel_apple_test.sh
+++ b/src/test/shell/bazel/bazel_apple_test.sh
@@ -517,4 +517,34 @@ EOF
//ios:swift_lib >$TEST_log 2>&1 || fail "should build"
}
+function test_apple_watch_with_swift() {
+ make_app
+
+ cat >ios/watchapp.swift <<EOF
+ import WatchKit
+ class ExtensionDelegate: NSObject, WKExtensionDelegate {
+ func applicationDidFinishLaunching() {}
+ }
+EOF
+
+ cat >ios/BUILD <<EOF
+load("//tools/build_defs/apple:swift.bzl", "swift_library")
+
+swift_library(name = "WatchModule",
+ srcs = ["watchapp.swift"])
+
+apple_binary(name = "bin",
+ deps = [":WatchModule"],
+ platform_type = "watchos")
+
+apple_watch2_extension(
+ name = "WatchExtension",
+ app_bundle_id = "com.google.app.watchkit",
+ app_name = "WatchApp",
+ binary = ":bin",
+ ext_bundle_id = "com.google.app.extension",
+)
+EOF
+}
+
run_suite "apple_tests"