From 7b53584c8743df62d66c86fd9aad2a204f68271d Mon Sep 17 00:00:00 2001 From: Maciej Piotrowski Date: Fri, 29 Aug 2025 14:01:39 +0200 Subject: [PATCH 1/3] Add `infoplists` parameter to iOS test rules --- doc/rules-ios.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/rules-ios.md b/doc/rules-ios.md index bbef7e5ebb..33adeebb78 100644 --- a/doc/rules-ios.md +++ b/doc/rules-ios.md @@ -592,7 +592,7 @@ Outputs: load("@rules_apple//apple:ios.doc.bzl", "ios_ui_test") ios_ui_test(name, deps, data, bundle_name, collect_code_coverage, env, env_inherit, - minimum_deployment_os_version, minimum_os_version, platform_type, runner, + minimum_deployment_os_version, minimum_os_version, infoplists, platform_type, runner, test_coverage_manifest, test_filter, test_host, test_host_is_bundle_loader) @@ -624,6 +624,7 @@ of the attributes inherited by all test rules, please check the | env_inherit | List of environment variables to inherit from the external environment. | List of strings | optional | `[]` | | minimum_deployment_os_version | A required string indicating the minimum deployment OS version supported by the target, represented as a dotted version number (for example, "9.0"). This is different from `minimum_os_version`, which is effective at compile time. Ensure version specific APIs are guarded with `available` clauses. | String | optional | `""` | | minimum_os_version | A required string indicating the minimum OS version supported by the target, represented as a dotted version number (for example, "9.0"). | String | required | | +| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | optional | `[]` | | platform_type | - | String | optional | `"ios"` | | runner | The runner target that will provide the logic on how to run the tests. Needs to provide the AppleTestRunnerInfo provider. | Label | required | | | test_coverage_manifest | A file that will be used in lcov export calls to limit the scope of files instrumented with coverage. | Label | optional | `None` | @@ -640,7 +641,7 @@ of the attributes inherited by all test rules, please check the load("@rules_apple//apple:ios.doc.bzl", "ios_unit_test") ios_unit_test(name, deps, data, bundle_name, collect_code_coverage, env, env_inherit, - minimum_deployment_os_version, minimum_os_version, platform_type, runner, + minimum_deployment_os_version, minimum_os_version, infoplists, platform_type, runner, test_coverage_manifest, test_filter, test_host, test_host_is_bundle_loader) @@ -678,6 +679,7 @@ of the attributes inherited by all test rules, please check the | env_inherit | List of environment variables to inherit from the external environment. | List of strings | optional | `[]` | | minimum_deployment_os_version | A required string indicating the minimum deployment OS version supported by the target, represented as a dotted version number (for example, "9.0"). This is different from `minimum_os_version`, which is effective at compile time. Ensure version specific APIs are guarded with `available` clauses. | String | optional | `""` | | minimum_os_version | A required string indicating the minimum OS version supported by the target, represented as a dotted version number (for example, "9.0"). | String | required | | +| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | optional | `[]` | | platform_type | - | String | optional | `"ios"` | | runner | The runner target that will provide the logic on how to run the tests. Needs to provide the AppleTestRunnerInfo provider. | Label | required | | | test_coverage_manifest | A file that will be used in lcov export calls to limit the scope of files instrumented with coverage. | Label | optional | `None` | From 3df8a254caa43e8b12f84ef0218164078777ab2e Mon Sep 17 00:00:00 2001 From: Maciej Piotrowski Date: Fri, 29 Aug 2025 22:16:58 +0200 Subject: [PATCH 2/3] Updates generated documentation --- apple/internal/rule_factory.bzl | 24 +++++++++++++------ .../internal/testing/apple_test_assembler.bzl | 6 ++--- doc/rules-ios.md | 14 ++++++----- doc/rules-macos.md | 12 ++++++---- doc/rules-tvos.md | 12 ++++++---- doc/rules-visionos.md | 13 ++++++---- doc/rules-watchos.md | 13 ++++++---- 7 files changed, 62 insertions(+), 32 deletions(-) diff --git a/apple/internal/rule_factory.bzl b/apple/internal/rule_factory.bzl index 87a642e2d2..cf72de8dc8 100644 --- a/apple/internal/rule_factory.bzl +++ b/apple/internal/rule_factory.bzl @@ -99,13 +99,6 @@ A file that will be used in lcov export calls to limit the scope of files instru """, allow_single_file = True, ), - "bundle_name": attr.string( - mandatory = False, - doc = """ -The desired name of the bundle (without the extension). If this attribute is not set, then the name -of the target will be used instead. -""", - ), } def _create_apple_rule( @@ -170,6 +163,23 @@ def _create_apple_test_rule(*, doc, implementation, platform_type): # The aspect is withheld to avoid unnecessary overhead in this instance of `test_host`, and # the provider is unnecessarily generic to accomodate any possible value of `test_host`. rule_attrs.test_host_attrs(aspects = [], providers = [[AppleBundleInfo]]), + # Add bundle attributes to make them visible in documentation + rule_attrs.infoplist_attrs(), + { + "bundle_name": attr.string( + mandatory = False, + doc = """ +The desired name of the bundle (without the extension). If this attribute is not set, then the name +of the target will be used instead. +""", + ), + "frameworks": attr.label_list( + providers = [[AppleBundleInfo]], + doc = """ +A list of framework targets that this target depends on. +""", + ), + }, ] return rule( diff --git a/apple/internal/testing/apple_test_assembler.bzl b/apple/internal/testing/apple_test_assembler.bzl index c696a313b5..689beaf11f 100644 --- a/apple/internal/testing/apple_test_assembler.bzl +++ b/apple/internal/testing/apple_test_assembler.bzl @@ -28,10 +28,7 @@ _BUNDLE_ATTRS = { "base_bundle_id", "bundle_id", "bundle_id_suffix", - "bundle_name", "families", - "frameworks", - "infoplists", "linkopts", "provisioning_profile", "resources", @@ -43,7 +40,10 @@ _BUNDLE_ATTRS = { _SHARED_TEST_BUNDLE_ATTRS = { x: None for x in [ + "bundle_name", "features", + "frameworks", + "infoplists", "minimum_os_version", "tags", "test_host", diff --git a/doc/rules-ios.md b/doc/rules-ios.md index 33adeebb78..6944fb18fa 100644 --- a/doc/rules-ios.md +++ b/doc/rules-ios.md @@ -591,8 +591,8 @@ Outputs:
 load("@rules_apple//apple:ios.doc.bzl", "ios_ui_test")
 
-ios_ui_test(name, deps, data, bundle_name, collect_code_coverage, env, env_inherit,
-            minimum_deployment_os_version, minimum_os_version, infoplists, platform_type, runner,
+ios_ui_test(name, deps, data, bundle_name, collect_code_coverage, env, env_inherit, frameworks,
+            infoplists, minimum_deployment_os_version, minimum_os_version, platform_type, runner,
             test_coverage_manifest, test_filter, test_host, test_host_is_bundle_loader)
 
@@ -622,9 +622,10 @@ of the attributes inherited by all test rules, please check the | collect_code_coverage | Whether to collect code coverage for this test if `--collect_code_coverage=yes`. | Boolean | optional | `True` | | env | Dictionary of environment variables that should be set during the test execution. The values of the dictionary are subject to "Make" variable expansion. | Dictionary: String -> String | optional | `{}` | | env_inherit | List of environment variables to inherit from the external environment. | List of strings | optional | `[]` | +| frameworks | A list of framework targets that this target depends on. | List of labels | optional | `[]` | +| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | required | | | minimum_deployment_os_version | A required string indicating the minimum deployment OS version supported by the target, represented as a dotted version number (for example, "9.0"). This is different from `minimum_os_version`, which is effective at compile time. Ensure version specific APIs are guarded with `available` clauses. | String | optional | `""` | | minimum_os_version | A required string indicating the minimum OS version supported by the target, represented as a dotted version number (for example, "9.0"). | String | required | | -| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | optional | `[]` | | platform_type | - | String | optional | `"ios"` | | runner | The runner target that will provide the logic on how to run the tests. Needs to provide the AppleTestRunnerInfo provider. | Label | required | | | test_coverage_manifest | A file that will be used in lcov export calls to limit the scope of files instrumented with coverage. | Label | optional | `None` | @@ -640,8 +641,8 @@ of the attributes inherited by all test rules, please check the
 load("@rules_apple//apple:ios.doc.bzl", "ios_unit_test")
 
-ios_unit_test(name, deps, data, bundle_name, collect_code_coverage, env, env_inherit,
-              minimum_deployment_os_version, minimum_os_version, infoplists, platform_type, runner,
+ios_unit_test(name, deps, data, bundle_name, collect_code_coverage, env, env_inherit, frameworks,
+              infoplists, minimum_deployment_os_version, minimum_os_version, platform_type, runner,
               test_coverage_manifest, test_filter, test_host, test_host_is_bundle_loader)
 
@@ -677,9 +678,10 @@ of the attributes inherited by all test rules, please check the | collect_code_coverage | Whether to collect code coverage for this test if `--collect_code_coverage=yes`. | Boolean | optional | `True` | | env | Dictionary of environment variables that should be set during the test execution. The values of the dictionary are subject to "Make" variable expansion. | Dictionary: String -> String | optional | `{}` | | env_inherit | List of environment variables to inherit from the external environment. | List of strings | optional | `[]` | +| frameworks | A list of framework targets that this target depends on. | List of labels | optional | `[]` | +| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | required | | | minimum_deployment_os_version | A required string indicating the minimum deployment OS version supported by the target, represented as a dotted version number (for example, "9.0"). This is different from `minimum_os_version`, which is effective at compile time. Ensure version specific APIs are guarded with `available` clauses. | String | optional | `""` | | minimum_os_version | A required string indicating the minimum OS version supported by the target, represented as a dotted version number (for example, "9.0"). | String | required | | -| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | optional | `[]` | | platform_type | - | String | optional | `"ios"` | | runner | The runner target that will provide the logic on how to run the tests. Needs to provide the AppleTestRunnerInfo provider. | Label | required | | | test_coverage_manifest | A file that will be used in lcov export calls to limit the scope of files instrumented with coverage. | Label | optional | `None` | diff --git a/doc/rules-macos.md b/doc/rules-macos.md index 59a3b6e3c3..bcc1c9255d 100644 --- a/doc/rules-macos.md +++ b/doc/rules-macos.md @@ -643,8 +643,8 @@ i.e. `--features=-swift.no_generated_header`).
 load("@rules_apple//apple:macos.doc.bzl", "macos_ui_test")
 
-macos_ui_test(name, deps, data, bundle_name, collect_code_coverage, env, env_inherit,
-              minimum_deployment_os_version, minimum_os_version, platform_type, runner,
+macos_ui_test(name, deps, data, bundle_name, collect_code_coverage, env, env_inherit, frameworks,
+              infoplists, minimum_deployment_os_version, minimum_os_version, platform_type, runner,
               test_coverage_manifest, test_filter, test_host, test_host_is_bundle_loader)
 
@@ -665,6 +665,8 @@ Note: macOS UI tests are not currently supported in the default test runner. | collect_code_coverage | Whether to collect code coverage for this test if `--collect_code_coverage=yes`. | Boolean | optional | `True` | | env | Dictionary of environment variables that should be set during the test execution. The values of the dictionary are subject to "Make" variable expansion. | Dictionary: String -> String | optional | `{}` | | env_inherit | List of environment variables to inherit from the external environment. | List of strings | optional | `[]` | +| frameworks | A list of framework targets that this target depends on. | List of labels | optional | `[]` | +| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | required | | | minimum_deployment_os_version | A required string indicating the minimum deployment OS version supported by the target, represented as a dotted version number (for example, "9.0"). This is different from `minimum_os_version`, which is effective at compile time. Ensure version specific APIs are guarded with `available` clauses. | String | optional | `""` | | minimum_os_version | A required string indicating the minimum OS version supported by the target, represented as a dotted version number (for example, "9.0"). | String | required | | | platform_type | - | String | optional | `"macos"` | @@ -682,8 +684,8 @@ Note: macOS UI tests are not currently supported in the default test runner.
 load("@rules_apple//apple:macos.doc.bzl", "macos_unit_test")
 
-macos_unit_test(name, deps, data, bundle_name, collect_code_coverage, env, env_inherit,
-                minimum_deployment_os_version, minimum_os_version, platform_type, runner,
+macos_unit_test(name, deps, data, bundle_name, collect_code_coverage, env, env_inherit, frameworks,
+                infoplists, minimum_deployment_os_version, minimum_os_version, platform_type, runner,
                 test_coverage_manifest, test_filter, test_host, test_host_is_bundle_loader)
 
@@ -710,6 +712,8 @@ find more information about testing for Apple platforms | collect_code_coverage | Whether to collect code coverage for this test if `--collect_code_coverage=yes`. | Boolean | optional | `True` | | env | Dictionary of environment variables that should be set during the test execution. The values of the dictionary are subject to "Make" variable expansion. | Dictionary: String -> String | optional | `{}` | | env_inherit | List of environment variables to inherit from the external environment. | List of strings | optional | `[]` | +| frameworks | A list of framework targets that this target depends on. | List of labels | optional | `[]` | +| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | required | | | minimum_deployment_os_version | A required string indicating the minimum deployment OS version supported by the target, represented as a dotted version number (for example, "9.0"). This is different from `minimum_os_version`, which is effective at compile time. Ensure version specific APIs are guarded with `available` clauses. | String | optional | `""` | | minimum_os_version | A required string indicating the minimum OS version supported by the target, represented as a dotted version number (for example, "9.0"). | String | required | | | platform_type | - | String | optional | `"macos"` | diff --git a/doc/rules-tvos.md b/doc/rules-tvos.md index 28d7a30624..f127d5d54f 100644 --- a/doc/rules-tvos.md +++ b/doc/rules-tvos.md @@ -340,8 +340,8 @@ i.e. `--features=-swift.no_generated_header`).
 load("@rules_apple//apple:tvos.doc.bzl", "tvos_ui_test")
 
-tvos_ui_test(name, deps, data, bundle_name, collect_code_coverage, env, env_inherit,
-             minimum_deployment_os_version, minimum_os_version, platform_type, runner,
+tvos_ui_test(name, deps, data, bundle_name, collect_code_coverage, env, env_inherit, frameworks,
+             infoplists, minimum_deployment_os_version, minimum_os_version, platform_type, runner,
              test_coverage_manifest, test_filter, test_host, test_host_is_bundle_loader)
 
@@ -366,6 +366,8 @@ the attributes inherited by all test rules, please check the | collect_code_coverage | Whether to collect code coverage for this test if `--collect_code_coverage=yes`. | Boolean | optional | `True` | | env | Dictionary of environment variables that should be set during the test execution. The values of the dictionary are subject to "Make" variable expansion. | Dictionary: String -> String | optional | `{}` | | env_inherit | List of environment variables to inherit from the external environment. | List of strings | optional | `[]` | +| frameworks | A list of framework targets that this target depends on. | List of labels | optional | `[]` | +| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | required | | | minimum_deployment_os_version | A required string indicating the minimum deployment OS version supported by the target, represented as a dotted version number (for example, "9.0"). This is different from `minimum_os_version`, which is effective at compile time. Ensure version specific APIs are guarded with `available` clauses. | String | optional | `""` | | minimum_os_version | A required string indicating the minimum OS version supported by the target, represented as a dotted version number (for example, "9.0"). | String | required | | | platform_type | - | String | optional | `"tvos"` | @@ -383,8 +385,8 @@ the attributes inherited by all test rules, please check the
 load("@rules_apple//apple:tvos.doc.bzl", "tvos_unit_test")
 
-tvos_unit_test(name, deps, data, bundle_name, collect_code_coverage, env, env_inherit,
-               minimum_deployment_os_version, minimum_os_version, platform_type, runner,
+tvos_unit_test(name, deps, data, bundle_name, collect_code_coverage, env, env_inherit, frameworks,
+               infoplists, minimum_deployment_os_version, minimum_os_version, platform_type, runner,
                test_coverage_manifest, test_filter, test_host, test_host_is_bundle_loader)
 
@@ -417,6 +419,8 @@ of the attributes inherited by all test rules, please check the | collect_code_coverage | Whether to collect code coverage for this test if `--collect_code_coverage=yes`. | Boolean | optional | `True` | | env | Dictionary of environment variables that should be set during the test execution. The values of the dictionary are subject to "Make" variable expansion. | Dictionary: String -> String | optional | `{}` | | env_inherit | List of environment variables to inherit from the external environment. | List of strings | optional | `[]` | +| frameworks | A list of framework targets that this target depends on. | List of labels | optional | `[]` | +| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | required | | | minimum_deployment_os_version | A required string indicating the minimum deployment OS version supported by the target, represented as a dotted version number (for example, "9.0"). This is different from `minimum_os_version`, which is effective at compile time. Ensure version specific APIs are guarded with `available` clauses. | String | optional | `""` | | minimum_os_version | A required string indicating the minimum OS version supported by the target, represented as a dotted version number (for example, "9.0"). | String | required | | | platform_type | - | String | optional | `"tvos"` | diff --git a/doc/rules-visionos.md b/doc/rules-visionos.md index c31655fe44..718ab8f264 100755 --- a/doc/rules-visionos.md +++ b/doc/rules-visionos.md @@ -286,8 +286,8 @@ i.e. `--features=-swift.no_generated_header`).
 load("@rules_apple//apple:visionos.doc.bzl", "visionos_ui_test")
 
-visionos_ui_test(name, deps, data, bundle_name, collect_code_coverage, env, env_inherit,
-                 minimum_deployment_os_version, minimum_os_version, platform_type, runner,
+visionos_ui_test(name, deps, data, bundle_name, collect_code_coverage, env, env_inherit, frameworks,
+                 infoplists, minimum_deployment_os_version, minimum_os_version, platform_type, runner,
                  test_coverage_manifest, test_filter, test_host, test_host_is_bundle_loader)
 
@@ -312,6 +312,8 @@ the attributes inherited by all test rules, please check the | collect_code_coverage | Whether to collect code coverage for this test if `--collect_code_coverage=yes`. | Boolean | optional | `True` | | env | Dictionary of environment variables that should be set during the test execution. The values of the dictionary are subject to "Make" variable expansion. | Dictionary: String -> String | optional | `{}` | | env_inherit | List of environment variables to inherit from the external environment. | List of strings | optional | `[]` | +| frameworks | A list of framework targets that this target depends on. | List of labels | optional | `[]` | +| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | required | | | minimum_deployment_os_version | A required string indicating the minimum deployment OS version supported by the target, represented as a dotted version number (for example, "9.0"). This is different from `minimum_os_version`, which is effective at compile time. Ensure version specific APIs are guarded with `available` clauses. | String | optional | `""` | | minimum_os_version | A required string indicating the minimum OS version supported by the target, represented as a dotted version number (for example, "9.0"). | String | required | | | platform_type | - | String | optional | `"visionos"` | @@ -330,8 +332,9 @@ the attributes inherited by all test rules, please check the load("@rules_apple//apple:visionos.doc.bzl", "visionos_unit_test") visionos_unit_test(name, deps, data, bundle_name, collect_code_coverage, env, env_inherit, - minimum_deployment_os_version, minimum_os_version, platform_type, runner, - test_coverage_manifest, test_filter, test_host, test_host_is_bundle_loader) + frameworks, infoplists, minimum_deployment_os_version, minimum_os_version, + platform_type, runner, test_coverage_manifest, test_filter, test_host, + test_host_is_bundle_loader) Builds and bundles a visionOS Unit `.xctest` test bundle. Runs the tests using the @@ -363,6 +366,8 @@ of the attributes inherited by all test rules, please check the | collect_code_coverage | Whether to collect code coverage for this test if `--collect_code_coverage=yes`. | Boolean | optional | `True` | | env | Dictionary of environment variables that should be set during the test execution. The values of the dictionary are subject to "Make" variable expansion. | Dictionary: String -> String | optional | `{}` | | env_inherit | List of environment variables to inherit from the external environment. | List of strings | optional | `[]` | +| frameworks | A list of framework targets that this target depends on. | List of labels | optional | `[]` | +| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | required | | | minimum_deployment_os_version | A required string indicating the minimum deployment OS version supported by the target, represented as a dotted version number (for example, "9.0"). This is different from `minimum_os_version`, which is effective at compile time. Ensure version specific APIs are guarded with `available` clauses. | String | optional | `""` | | minimum_os_version | A required string indicating the minimum OS version supported by the target, represented as a dotted version number (for example, "9.0"). | String | required | | | platform_type | - | String | optional | `"visionos"` | diff --git a/doc/rules-watchos.md b/doc/rules-watchos.md index d6877b8c07..1e699b26ee 100644 --- a/doc/rules-watchos.md +++ b/doc/rules-watchos.md @@ -306,8 +306,8 @@ Builds and bundles a watchOS Static Framework.
 load("@rules_apple//apple:watchos.doc.bzl", "watchos_ui_test")
 
-watchos_ui_test(name, deps, data, bundle_name, collect_code_coverage, env, env_inherit,
-                minimum_deployment_os_version, minimum_os_version, platform_type, runner,
+watchos_ui_test(name, deps, data, bundle_name, collect_code_coverage, env, env_inherit, frameworks,
+                infoplists, minimum_deployment_os_version, minimum_os_version, platform_type, runner,
                 test_coverage_manifest, test_filter, test_host, test_host_is_bundle_loader)
 
@@ -325,6 +325,8 @@ watchOS UI Test rule. | collect_code_coverage | Whether to collect code coverage for this test if `--collect_code_coverage=yes`. | Boolean | optional | `True` | | env | Dictionary of environment variables that should be set during the test execution. The values of the dictionary are subject to "Make" variable expansion. | Dictionary: String -> String | optional | `{}` | | env_inherit | List of environment variables to inherit from the external environment. | List of strings | optional | `[]` | +| frameworks | A list of framework targets that this target depends on. | List of labels | optional | `[]` | +| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | required | | | minimum_deployment_os_version | A required string indicating the minimum deployment OS version supported by the target, represented as a dotted version number (for example, "9.0"). This is different from `minimum_os_version`, which is effective at compile time. Ensure version specific APIs are guarded with `available` clauses. | String | optional | `""` | | minimum_os_version | A required string indicating the minimum OS version supported by the target, represented as a dotted version number (for example, "9.0"). | String | required | | | platform_type | - | String | optional | `"watchos"` | @@ -343,8 +345,9 @@ watchOS UI Test rule. load("@rules_apple//apple:watchos.doc.bzl", "watchos_unit_test") watchos_unit_test(name, deps, data, bundle_name, collect_code_coverage, env, env_inherit, - minimum_deployment_os_version, minimum_os_version, platform_type, runner, - test_coverage_manifest, test_filter, test_host, test_host_is_bundle_loader) + frameworks, infoplists, minimum_deployment_os_version, minimum_os_version, + platform_type, runner, test_coverage_manifest, test_filter, test_host, + test_host_is_bundle_loader) watchOS Unit Test rule. @@ -361,6 +364,8 @@ watchOS Unit Test rule. | collect_code_coverage | Whether to collect code coverage for this test if `--collect_code_coverage=yes`. | Boolean | optional | `True` | | env | Dictionary of environment variables that should be set during the test execution. The values of the dictionary are subject to "Make" variable expansion. | Dictionary: String -> String | optional | `{}` | | env_inherit | List of environment variables to inherit from the external environment. | List of strings | optional | `[]` | +| frameworks | A list of framework targets that this target depends on. | List of labels | optional | `[]` | +| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | required | | | minimum_deployment_os_version | A required string indicating the minimum deployment OS version supported by the target, represented as a dotted version number (for example, "9.0"). This is different from `minimum_os_version`, which is effective at compile time. Ensure version specific APIs are guarded with `available` clauses. | String | optional | `""` | | minimum_os_version | A required string indicating the minimum OS version supported by the target, represented as a dotted version number (for example, "9.0"). | String | required | | | platform_type | - | String | optional | `"watchos"` | From 0325020bcf9c51a3bc9073d314fc846d0197af03 Mon Sep 17 00:00:00 2001 From: Maciej Piotrowski Date: Mon, 1 Sep 2025 14:51:37 +0200 Subject: [PATCH 3/3] Fixes failures --- apple/internal/rule_factory.bzl | 2 +- doc/rules-ios.md | 4 ++-- doc/rules-macos.md | 4 ++-- doc/rules-tvos.md | 4 ++-- doc/rules-visionos.md | 4 ++-- doc/rules-watchos.md | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/apple/internal/rule_factory.bzl b/apple/internal/rule_factory.bzl index cf72de8dc8..106b5ea208 100644 --- a/apple/internal/rule_factory.bzl +++ b/apple/internal/rule_factory.bzl @@ -164,7 +164,7 @@ def _create_apple_test_rule(*, doc, implementation, platform_type): # the provider is unnecessarily generic to accomodate any possible value of `test_host`. rule_attrs.test_host_attrs(aspects = [], providers = [[AppleBundleInfo]]), # Add bundle attributes to make them visible in documentation - rule_attrs.infoplist_attrs(), + rule_attrs.infoplist_attrs(default_infoplist = "//apple/testing:DefaultTestBundlePlist"), { "bundle_name": attr.string( mandatory = False, diff --git a/doc/rules-ios.md b/doc/rules-ios.md index 6944fb18fa..f8c576bb43 100644 --- a/doc/rules-ios.md +++ b/doc/rules-ios.md @@ -623,7 +623,7 @@ of the attributes inherited by all test rules, please check the | env | Dictionary of environment variables that should be set during the test execution. The values of the dictionary are subject to "Make" variable expansion. | Dictionary: String -> String | optional | `{}` | | env_inherit | List of environment variables to inherit from the external environment. | List of strings | optional | `[]` | | frameworks | A list of framework targets that this target depends on. | List of labels | optional | `[]` | -| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | required | | +| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | optional | `["@rules_apple//apple/testing:DefaultTestBundlePlist"]` | | minimum_deployment_os_version | A required string indicating the minimum deployment OS version supported by the target, represented as a dotted version number (for example, "9.0"). This is different from `minimum_os_version`, which is effective at compile time. Ensure version specific APIs are guarded with `available` clauses. | String | optional | `""` | | minimum_os_version | A required string indicating the minimum OS version supported by the target, represented as a dotted version number (for example, "9.0"). | String | required | | | platform_type | - | String | optional | `"ios"` | @@ -679,7 +679,7 @@ of the attributes inherited by all test rules, please check the | env | Dictionary of environment variables that should be set during the test execution. The values of the dictionary are subject to "Make" variable expansion. | Dictionary: String -> String | optional | `{}` | | env_inherit | List of environment variables to inherit from the external environment. | List of strings | optional | `[]` | | frameworks | A list of framework targets that this target depends on. | List of labels | optional | `[]` | -| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | required | | +| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | optional | `["@rules_apple//apple/testing:DefaultTestBundlePlist"]` | | minimum_deployment_os_version | A required string indicating the minimum deployment OS version supported by the target, represented as a dotted version number (for example, "9.0"). This is different from `minimum_os_version`, which is effective at compile time. Ensure version specific APIs are guarded with `available` clauses. | String | optional | `""` | | minimum_os_version | A required string indicating the minimum OS version supported by the target, represented as a dotted version number (for example, "9.0"). | String | required | | | platform_type | - | String | optional | `"ios"` | diff --git a/doc/rules-macos.md b/doc/rules-macos.md index bcc1c9255d..985e47e28b 100644 --- a/doc/rules-macos.md +++ b/doc/rules-macos.md @@ -666,7 +666,7 @@ Note: macOS UI tests are not currently supported in the default test runner. | env | Dictionary of environment variables that should be set during the test execution. The values of the dictionary are subject to "Make" variable expansion. | Dictionary: String -> String | optional | `{}` | | env_inherit | List of environment variables to inherit from the external environment. | List of strings | optional | `[]` | | frameworks | A list of framework targets that this target depends on. | List of labels | optional | `[]` | -| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | required | | +| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | optional | `["@rules_apple//apple/testing:DefaultTestBundlePlist"]` | | minimum_deployment_os_version | A required string indicating the minimum deployment OS version supported by the target, represented as a dotted version number (for example, "9.0"). This is different from `minimum_os_version`, which is effective at compile time. Ensure version specific APIs are guarded with `available` clauses. | String | optional | `""` | | minimum_os_version | A required string indicating the minimum OS version supported by the target, represented as a dotted version number (for example, "9.0"). | String | required | | | platform_type | - | String | optional | `"macos"` | @@ -713,7 +713,7 @@ find more information about testing for Apple platforms | env | Dictionary of environment variables that should be set during the test execution. The values of the dictionary are subject to "Make" variable expansion. | Dictionary: String -> String | optional | `{}` | | env_inherit | List of environment variables to inherit from the external environment. | List of strings | optional | `[]` | | frameworks | A list of framework targets that this target depends on. | List of labels | optional | `[]` | -| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | required | | +| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | optional | `["@rules_apple//apple/testing:DefaultTestBundlePlist"]` | | minimum_deployment_os_version | A required string indicating the minimum deployment OS version supported by the target, represented as a dotted version number (for example, "9.0"). This is different from `minimum_os_version`, which is effective at compile time. Ensure version specific APIs are guarded with `available` clauses. | String | optional | `""` | | minimum_os_version | A required string indicating the minimum OS version supported by the target, represented as a dotted version number (for example, "9.0"). | String | required | | | platform_type | - | String | optional | `"macos"` | diff --git a/doc/rules-tvos.md b/doc/rules-tvos.md index f127d5d54f..d527b96eca 100644 --- a/doc/rules-tvos.md +++ b/doc/rules-tvos.md @@ -367,7 +367,7 @@ the attributes inherited by all test rules, please check the | env | Dictionary of environment variables that should be set during the test execution. The values of the dictionary are subject to "Make" variable expansion. | Dictionary: String -> String | optional | `{}` | | env_inherit | List of environment variables to inherit from the external environment. | List of strings | optional | `[]` | | frameworks | A list of framework targets that this target depends on. | List of labels | optional | `[]` | -| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | required | | +| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | optional | `["@rules_apple//apple/testing:DefaultTestBundlePlist"]` | | minimum_deployment_os_version | A required string indicating the minimum deployment OS version supported by the target, represented as a dotted version number (for example, "9.0"). This is different from `minimum_os_version`, which is effective at compile time. Ensure version specific APIs are guarded with `available` clauses. | String | optional | `""` | | minimum_os_version | A required string indicating the minimum OS version supported by the target, represented as a dotted version number (for example, "9.0"). | String | required | | | platform_type | - | String | optional | `"tvos"` | @@ -420,7 +420,7 @@ of the attributes inherited by all test rules, please check the | env | Dictionary of environment variables that should be set during the test execution. The values of the dictionary are subject to "Make" variable expansion. | Dictionary: String -> String | optional | `{}` | | env_inherit | List of environment variables to inherit from the external environment. | List of strings | optional | `[]` | | frameworks | A list of framework targets that this target depends on. | List of labels | optional | `[]` | -| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | required | | +| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | optional | `["@rules_apple//apple/testing:DefaultTestBundlePlist"]` | | minimum_deployment_os_version | A required string indicating the minimum deployment OS version supported by the target, represented as a dotted version number (for example, "9.0"). This is different from `minimum_os_version`, which is effective at compile time. Ensure version specific APIs are guarded with `available` clauses. | String | optional | `""` | | minimum_os_version | A required string indicating the minimum OS version supported by the target, represented as a dotted version number (for example, "9.0"). | String | required | | | platform_type | - | String | optional | `"tvos"` | diff --git a/doc/rules-visionos.md b/doc/rules-visionos.md index 718ab8f264..4031da7e66 100755 --- a/doc/rules-visionos.md +++ b/doc/rules-visionos.md @@ -313,7 +313,7 @@ the attributes inherited by all test rules, please check the | env | Dictionary of environment variables that should be set during the test execution. The values of the dictionary are subject to "Make" variable expansion. | Dictionary: String -> String | optional | `{}` | | env_inherit | List of environment variables to inherit from the external environment. | List of strings | optional | `[]` | | frameworks | A list of framework targets that this target depends on. | List of labels | optional | `[]` | -| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | required | | +| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | optional | `["@rules_apple//apple/testing:DefaultTestBundlePlist"]` | | minimum_deployment_os_version | A required string indicating the minimum deployment OS version supported by the target, represented as a dotted version number (for example, "9.0"). This is different from `minimum_os_version`, which is effective at compile time. Ensure version specific APIs are guarded with `available` clauses. | String | optional | `""` | | minimum_os_version | A required string indicating the minimum OS version supported by the target, represented as a dotted version number (for example, "9.0"). | String | required | | | platform_type | - | String | optional | `"visionos"` | @@ -367,7 +367,7 @@ of the attributes inherited by all test rules, please check the | env | Dictionary of environment variables that should be set during the test execution. The values of the dictionary are subject to "Make" variable expansion. | Dictionary: String -> String | optional | `{}` | | env_inherit | List of environment variables to inherit from the external environment. | List of strings | optional | `[]` | | frameworks | A list of framework targets that this target depends on. | List of labels | optional | `[]` | -| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | required | | +| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | optional | `["@rules_apple//apple/testing:DefaultTestBundlePlist"]` | | minimum_deployment_os_version | A required string indicating the minimum deployment OS version supported by the target, represented as a dotted version number (for example, "9.0"). This is different from `minimum_os_version`, which is effective at compile time. Ensure version specific APIs are guarded with `available` clauses. | String | optional | `""` | | minimum_os_version | A required string indicating the minimum OS version supported by the target, represented as a dotted version number (for example, "9.0"). | String | required | | | platform_type | - | String | optional | `"visionos"` | diff --git a/doc/rules-watchos.md b/doc/rules-watchos.md index 1e699b26ee..7e8d30efd4 100644 --- a/doc/rules-watchos.md +++ b/doc/rules-watchos.md @@ -326,7 +326,7 @@ watchOS UI Test rule. | env | Dictionary of environment variables that should be set during the test execution. The values of the dictionary are subject to "Make" variable expansion. | Dictionary: String -> String | optional | `{}` | | env_inherit | List of environment variables to inherit from the external environment. | List of strings | optional | `[]` | | frameworks | A list of framework targets that this target depends on. | List of labels | optional | `[]` | -| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | required | | +| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | optional | `["@rules_apple//apple/testing:DefaultTestBundlePlist"]` | | minimum_deployment_os_version | A required string indicating the minimum deployment OS version supported by the target, represented as a dotted version number (for example, "9.0"). This is different from `minimum_os_version`, which is effective at compile time. Ensure version specific APIs are guarded with `available` clauses. | String | optional | `""` | | minimum_os_version | A required string indicating the minimum OS version supported by the target, represented as a dotted version number (for example, "9.0"). | String | required | | | platform_type | - | String | optional | `"watchos"` | @@ -365,7 +365,7 @@ watchOS Unit Test rule. | env | Dictionary of environment variables that should be set during the test execution. The values of the dictionary are subject to "Make" variable expansion. | Dictionary: String -> String | optional | `{}` | | env_inherit | List of environment variables to inherit from the external environment. | List of strings | optional | `[]` | | frameworks | A list of framework targets that this target depends on. | List of labels | optional | `[]` | -| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | required | | +| infoplists | A list of .plist files that will be merged to form the Info.plist for this target. At least one file must be specified. Please see [Info.plist Handling](https://github.com/bazelbuild/rules_apple/blob/master/doc/common_info.md#infoplist-handling) for what is supported. | List of labels | optional | `["@rules_apple//apple/testing:DefaultTestBundlePlist"]` | | minimum_deployment_os_version | A required string indicating the minimum deployment OS version supported by the target, represented as a dotted version number (for example, "9.0"). This is different from `minimum_os_version`, which is effective at compile time. Ensure version specific APIs are guarded with `available` clauses. | String | optional | `""` | | minimum_os_version | A required string indicating the minimum OS version supported by the target, represented as a dotted version number (for example, "9.0"). | String | required | | | platform_type | - | String | optional | `"watchos"` |