Skip to content

Conversation

kapoorlakshya
Copy link
Contributor

@kapoorlakshya kapoorlakshya commented May 16, 2025

Add new attr post_action_determines_exit_code to let the test runner post action determine the exit status. Our use case is allow soft failing of certain test targets.

ios_xctestrun_runner(
    name = "ios_sim_runner_with_soft_fail",
    device_type = "iPhone Xs",
    post_action = ":post_action_soft_fail",
    post_action_determines_exit_code = True,
)

@kapoorlakshya kapoorlakshya marked this pull request as ready for review May 16, 2025 19:36
Copy link
Contributor

@luispadron luispadron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this but could we make this an actual attr of the test runner in addition to an env var? It's more discoverable that way

@kapoorlakshya
Copy link
Contributor Author

I like this but could we make this an actual attr of the test runner in addition to an env var? It's more discoverable that way

@brentleyjones and I discussed this earlier and the reason for this approach is to allow toggling this from a .bazelrc. Brentley, thoughts?

@brentleyjones
Copy link
Collaborator

For us I guess it doesn't matter, since we have a macro and can apply it to every instance. The environment variable has the nice effect of (1) easily applying it globally if you want (2) automatically passed into post_action where we can check it if we want to.

@brentleyjones brentleyjones merged commit 281186e into bazelbuild:master May 19, 2025
8 checks passed
@kapoorlakshya kapoorlakshya deleted the lk/soft_fail branch May 19, 2025 23:15
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.

4 participants