[swift-users] Debugging XCTests on Linux
ratkins+swift-users at fastmail.fm
Thu Jan 5 04:03:42 CST 2017
I'm trying to solve a simple (?) problem where a test suite runs fine on
macOS but fails on Linux
I've downloaded and installed the Swift Linux Docker image
(https://ashfurrow.com/blog/swift-on-linux/) and got the project
building and testing, and, mercifully, I get the same failure locally as
I'm getting on Travis CI. But at this point I'm stuck.
1) I can't get the SPM-built module the project produces working
properly in the Swift REPL in order to just play around with it
(https://bugs.swift.org/browse/SR-1191). Can anyone help me with this?
2a) How do I use LLDB to set a breakpoint in a test method and step into
its execution so I can trace through the source of the test failure?
Saying "lldb swift test" does something, but doesn't know about any of
the lines I'm trying to set a breakpoint on—I suspect it thinks I'm
trying to set breakpoints in the swift binary itself, rather than the
2b) Saying "swift -warnings-as-errors test" doesn't seem to do what I
want, complaining about "no such file or directory: 'test'", whereas
"swift test" works fine. Is there a way to pass flags to the swift
interpreter when it runs tests?
More information about the swift-users