diff --git a/apple/ios/BUILD.bazel b/apple/ios/BUILD.bazel index b994e6e495..5bea82691e 100644 --- a/apple/ios/BUILD.bazel +++ b/apple/ios/BUILD.bazel @@ -582,7 +582,7 @@ failure_test( apple_ios_export( name = "export_simulator", - app = ":simulator_app", + app = "//apple/tests/fixtures/swift_app:ledger_app", ) failure_test( diff --git a/apple/ios/app.bzl b/apple/ios/app.bzl index 18203c1e5f..df2faf5d04 100644 --- a/apple/ios/app.bzl +++ b/apple/ios/app.bzl @@ -649,7 +649,7 @@ def apple_ios_app( def _test_selection_impl(ctx): failures = test_errors(ctx.attr.device_type, ctx.attr.os_version, ctx.attr.deployment) - failures.extend(test_source_errors(ctx.attr.srcs, ctx.attr.deps)) + failures.extend(test_source_errors(ctx.attr.srcs, ctx.attr.dep_labels)) if len(failures) > 0: fail("; ".join(failures)) return [CcInfo()] @@ -666,7 +666,7 @@ _test_selection = rule( doc = "Simulator device type to run tests on, such as iPhone 16.", mandatory = True, ), - "deps": attr.string_list( + "dep_labels": attr.string_list( doc = "Label texts of test modules.", mandatory = True, ), @@ -699,7 +699,7 @@ def apple_ios_app_test( device_type = device_type, os_version = os_version, srcs = [label_text(src) for src in srcs], - deps = [label_text(dep) for dep in deps], + dep_labels = [label_text(dep) for dep in deps], tags = ["manual"], testonly = True, visibility = ["//visibility:private"], diff --git a/apple/tests/fixtures/swift_app/BUILD.bazel b/apple/tests/fixtures/swift_app/BUILD.bazel index 722bfe6b01..5bdeb772a4 100644 --- a/apple/tests/fixtures/swift_app/BUILD.bazel +++ b/apple/tests/fixtures/swift_app/BUILD.bazel @@ -1,8 +1,8 @@ # gazelle:ignore -load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@rules_shell//shell:sh_test.bzl", "sh_test") load("@rules_swift//swift:swift_interop_hint.bzl", "swift_interop_hint") load("//apple/ios:app.bzl", "apple_ios_app", "apple_ios_app_test") +load("//apple/ios:cell.bzl", "APPLE_HOSTS") load("//cc/rules:defs.bzl", "cc_library") load("//rust/rules:defs.bzl", "rust_static_library", "rustfmt_test") load("//swift/rules:defs.bzl", "swift_library") @@ -14,9 +14,10 @@ _MACOS_ARM64 = [ rust_static_library( name = "ledger_rust", + tags = ["manual"], srcs = ["ledger.rs"], edition = "2021", - target_compatible_with = _MACOS_ARM64, + target_compatible_with = APPLE_HOSTS, ) rustfmt_test( @@ -27,32 +28,36 @@ rustfmt_test( swift_interop_hint( name = "ledger_core_hint", + tags = ["manual"], module_name = "LedgerCore", - target_compatible_with = _MACOS_ARM64, + target_compatible_with = APPLE_HOSTS, ) cc_library( name = "ledger_core", + tags = ["manual"], visibility = ["//apple/tests/fixtures/swift_app/main:__pkg__"], hdrs = ["ledger.h"], aspect_hints = [":ledger_core_hint"], - target_compatible_with = _MACOS_ARM64, + target_compatible_with = APPLE_HOSTS, ) swift_library( name = "ledger_kit", + tags = ["manual"], visibility = ["//apple/tests/fixtures/swift_app/main:__pkg__"], srcs = ["LedgerKit.swift"], module_name = "LedgerKit", - target_compatible_with = _MACOS_ARM64, + target_compatible_with = APPLE_HOSTS, ) swift_library( name = "ledger_xctests", + tags = ["manual"], testonly = True, srcs = ["LedgerAppTests.swift"], module_name = "LedgerAppTests", - target_compatible_with = _MACOS_ARM64, + target_compatible_with = APPLE_HOSTS, deps = [ ":ledger_core", ":ledger_kit", @@ -69,25 +74,7 @@ apple_ios_app( resources = ["entries.txt"], tags = ["manual"], version = "1.4", -) - -apple_ios_app( - name = "ledger_device", - bundle_id = "com.example.ledger.device", - deployment = "17.0", - entry = "//apple/tests/fixtures/swift_app/main:ledger_main", - library = ":ledger_rust", - platforms = ["device/arm64"], - provisioning_profile = "ledger_device.mobileprovision", - resources = ["entries.txt"], - tags = ["manual"], - version = "1.4", -) - -build_test( - name = "ledger_device_build_test", - targets = [":ledger_device"], - target_compatible_with = _MACOS_ARM64, + visibility = ["//apple/ios:__pkg__"], ) apple_ios_app_test( diff --git a/apple/tests/fixtures/swift_app/ledger_device.mobileprovision b/apple/tests/fixtures/swift_app/ledger_device.mobileprovision deleted file mode 100644 index c740bf1f2a..0000000000 Binary files a/apple/tests/fixtures/swift_app/ledger_device.mobileprovision and /dev/null differ diff --git a/apple/tests/fixtures/swift_app/main/BUILD.bazel b/apple/tests/fixtures/swift_app/main/BUILD.bazel index f3d89ae059..4e1b66a1c8 100644 --- a/apple/tests/fixtures/swift_app/main/BUILD.bazel +++ b/apple/tests/fixtures/swift_app/main/BUILD.bazel @@ -1,14 +1,13 @@ # gazelle:ignore +load("//apple/ios:cell.bzl", "APPLE_HOSTS") load("//swift/rules:defs.bzl", "swift_library") swift_library( name = "ledger_main", + tags = ["manual"], srcs = ["LedgerAppDelegate.swift"], module_name = "LedgerApp", - target_compatible_with = [ - "@platforms//os:macos", - "@platforms//cpu:arm64", - ], + target_compatible_with = APPLE_HOSTS, visibility = ["//apple/tests/fixtures/swift_app:__pkg__"], deps = [ "//apple/tests/fixtures/swift_app:ledger_core",