Is there a way to run Swift tests from the command line in LLDB on macOS?
On Linux, I am able to do
lldb .build/debug/MyPackageTests.xctest. On macOS, I run into two issues:
.build/debug/MyPackageTests.xctestis not an executable, but a bundle and trying to run
.build/debug/MyPackageTests.xctest/Contents/MacOS/MyPackageTestsgives me an
exec format error(my wild guess is that on macOS the tests are a static library which is dynamically loaded).
- macOS requires special privileges to attach to a process (as evidenced by Xcode requesting permissions when debugging a local executable) and I'm not sure how to grant these permissions to my shell or
sudo DevToolsSecurity --enableis the only seemingly relevant thing I've found and that doesn't seem to work.
Does anyone in the community have ideas about what I can try next?