You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Xcode 12+ a test case which calls into a function that then calls something like XCTFail/XCTAssert* has proper traces back up the stack to the originating caller. This helps diagnose where the test case failure is called. This happens automatically in a new Xcode 12+ project, for example:
The same code in a BwB rules_xcodeproj project only shows the trace for the XCTAssert:
Reproduction steps
Write a test which calls into some other function that then fails. Or see the attached zip with a vanilla Xcode and rules_xcodeproj example to reproduce the issue.
I expect this is yet another "relative paths break Xcode" issue (e.g. #1119, #1284, #1336). Try launching Xcode from the Bazel execution root (I believe described in one or more of those issues) to see if that fixes it.
This might be fixable the same way that we fixed test issues to begin with, by swizzling something: bazelbuild/apple_support#128.
Same issue with Swift Testing, we only see test failures inline at the top-level test function level, not at the actual point of failure in the test sources. Would really love to see this issue fixed as-well 🙏
Description
In Xcode 12+ a test case which calls into a function that then calls something like
XCTFail
/XCTAssert*
has proper traces back up the stack to the originating caller. This helps diagnose where the test case failure is called. This happens automatically in a new Xcode 12+ project, for example:The same code in a BwB rules_xcodeproj project only shows the trace for the
XCTAssert
:Reproduction steps
Write a test which calls into some other function that then fails. Or see the attached zip with a vanilla Xcode and rules_xcodeproj example to reproduce the issue.
TestTracingExample.zip
Expected behavior
The test failures look like they do in vanilla Xcode
rules_xcodeproj version
2.4.0
Xcode version
15.4
Bazel version
7.2.0
rules_apple version
3.5.1
rules_swift version
1.18.0
Additional information
No response
The text was updated successfully, but these errors were encountered: