Skip to content

Conversation

@marcelofabri
Copy link

In the bazel world, it's common to run tests with the xctest binary directly instead of calling xcodebuild (reference) for performance reasons.

However, xctest doesn't handle crashes very well: it abruptly stops the execution, without marking the test case as failed. Because of that, xcbeautify doesn't mark the test as failed in the JUnit XML (in fact it's not even added).

This PR handles that.

@marcelofabri marcelofabri requested a review from cpisciotta as a code owner May 20, 2025 20:54
/// $1 = whole error.
/// it varies a lot, not sure if it makes sense to catch everything separately
static let regex = XCRegex(pattern: #"^(fatal error:.*)$"#)
static let regex = XCRegex(pattern: #"^((?:.* )?[fF]atal error:.*)$"#)
Copy link
Author

Choose a reason for hiding this comment

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

let me know if you'd rather have a separate capture group for this

Copy link
Owner

Choose a reason for hiding this comment

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

Looking at the example test file... Do you expect the prefix to always be the file / line number? If so, I think we should make a separate group, so we can extract that information.

Copy link
Owner

@cpisciotta cpisciotta left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @marcelofabri! Do you mind resolving the conflicts and addressing the one comment? After which, happy to get this in.

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.

2 participants