Skip to content

Expose .xctestrun files to test pre-actions - #3105

Draft
brentleyjones wants to merge 1 commit into
mainfrom
bj/expose-xctestrun-to-pre-actions
Draft

brentleyjones wants to merge 1 commit into
mainfrom
bj/expose-xctestrun-to-pre-actions

Conversation

@brentleyjones

@brentleyjones brentleyjones commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Pre-actions currently run before the .xctestrun file is generated, so they cannot adjust the prepared test configuration before xcodebuild launches.

Run the pre-action after generating the file and pass its path in TEST_XCTESTRUN_FILE. The hook can then update environment variables, arguments, or other XCTest settings. It still receives SIMULATOR_UDID and runs once on either execution path; TEST_XCTESTRUN_FILE is only supplied when using xcodebuild.

Validation:

  • buildifier formatting and lint checks passed.
  • Runner regression tests passed in a consuming workspace with this checkout supplied through --override_module=rules_apple=.... They exercise edits to the generated test environment and arguments, verify the hook runs once with the simulator ID, and cover direct xctest execution. Simulator and Xcode commands are stubbed in these tests.
  • Regenerated API documentation with bazel run //doc:update; bazel test //doc:check_ios passed.

@brentleyjones brentleyjones added AI Generated Changes prepared with AI assistance and removed AI Generated Changes prepared with AI assistance labels Oct 19, 2026
@brentleyjones
brentleyjones force-pushed the bj/expose-xctestrun-to-pre-actions branch from 4276fbf to 9720b67 Compare October 19, 2026 19:01
@brentleyjones brentleyjones added AI Generated Changes prepared with AI assistance and removed AI Generated Changes prepared with AI assistance labels Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant