-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[stdlib] Port StdlibUnittest to FreeBSD. #902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Very cool! @gribozavr is probably the best one to look at this, but he is out of town until next week. Maybe @dabrahams could also look? |
@@ -16,7 +16,7 @@ import SwiftPrivateDarwinExtras | |||
|
|||
#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS) | |||
import Darwin | |||
#elseif os(Linux) | |||
#elseif os(Linux) || os(FreeBSD) | |||
import Glibc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm OK with this in the short term, but as we discussed before, Glibc is not the right module name on FreeBSD.
@dcci Thank you! For a full port, you need to modify |
Uh, OK, thanks Dmitri and Chris, I'll update the pull request accordingly. BTW, is there an easy way to run a single test in the swift test suite? In LLVM I'd run llvm-lit -sv $testpath but it doesn't seem to do the trick here (unless I'm missing something). |
Take a look at Testing.rst. It's not quite that simple but it's close. IIRC there's also a --filter option for bare lit. (We don't have an llvm-lit because we have multiple testing configs. I guess we could do one that defaults to the host target.) |
Update pull request after comments. |
var XFailsFreeBSD = TestSuite("XFailsFreeBSD") | ||
|
||
// CHECK: [ UXPASS ] XFailsFreeBSD.xfail iOS passes{{$}} | ||
XFailsFreeBSD.test("xfail iOS passes").xfail(.FreeBSDAny(reason: "")).code { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/iOS/FreeBSD/
?
Updated fail messages -> s/iOS/FreeBSD. |
@@ -1180,6 +1187,10 @@ public enum TestRunPredicate : CustomStringConvertible { | |||
case LinuxAny(reason: let reason): | |||
return "LinuxAny(*, reason: \(reason))" | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This brace terminates the switch statement, it shouldn't be present. Does the code build for you? It fails for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, it does for me, weirdly. Apparently something went wrong when I rebased and updated the pull request. Let me try again.
Updated. Hopefully no changes got lost this time. I also tried to squash the two commits in one. Thanks! |
@dcci Thanks, tests pass now! |
[stdlib] Port StdlibUnittest to FreeBSD.
We almost got there :)