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
Hello, I was wondering if it is possible to obtain a backtrace (see https://github.com/apple/swift/blob/main/docs/Backtracing.rst) in the failure report of Xcode tests run via Bazel? Merely setting env = {"SWIFT_BACKTRACE":"enable=yes"} doesn't seem to help on MacOS.
The text was updated successfully, but these errors were encountered:
I played around with this today and may come back to it.
You can indeed codesign the bundle (or binary within the bundle) by using codesign --force --sign - --entitlements get-task-allow.plist path/to/bundle.xctest or codesign --force --sign - --entitlements get-task-allow.plist path/to/bundle.xctest/path/to/binary. Having done so, you can cd into the sandbox and run the test with SWIFT_BACKTRACE=enable=yes xcrun xctest libs/swift/DockerTestContainers/DockerTestContainersTests.xctest. Unfortunately, this did not produce a stack trace in the output. Its unclear to me why this was the case; I am in the process of debugging a race condition and I suspect the signing or backtrace instrumentation may prevent the test failure in my code from happening, or it might just not work.
I think the following might be needed to make this work on MacOS:
possibly disabling bundling
adding an option to swift_test to add the required signature and entitlement
I assume it probably already works for swift linux users based on the docs, and the fact that the test is just a plain binary in linux.
Hello, I was wondering if it is possible to obtain a backtrace (see https://github.com/apple/swift/blob/main/docs/Backtracing.rst) in the failure report of Xcode tests run via Bazel? Merely setting
env = {"SWIFT_BACKTRACE":"enable=yes"}
doesn't seem to help on MacOS.The text was updated successfully, but these errors were encountered: