Closed MaxDesiatov closed 1 year ago
@swift-ci test
@natecook1000 @shahmishal I'm not sure what to make of this failure
The code under test is guarded by:
mutating func run() async throws {
guard #available(macOS 12.0, iOS 15.0, tvOS 15.0, watchOS 8.0, *) else {
print("'count-lines' isn't supported on this platform.")
return
}
and the tests are similarly guarded:
func testCountLines() throws {
guard #available(macOS 12, *) else { return }
Somehow the test guard is passed but the run
guard is not passed causing a test failure. This only seems plausible if the test platform is not macOS but supposedly the test platform is macOS. Any ideas what's going on?
@swift-ci please test macOS
Very odd… From the test output before the tests are run, the CI appears to be running on macOS 12.6:
+ sw_vers
ProductName: macOS
ProductVersion: 12.6
BuildVersion: 21G115
[Pipeline] sh
+ swift --version
Apple Swift version 5.9-dev (LLVM d4f2e6a78286ad2, Swift cbd0b15fb9ecffb)
Target: x86_64-apple-macosx12.0
But the output indicates that it's running under macOS 10.16 (the last bit is ProcessInfo.processInfo.operatingSystemVersionString
):
error: -[ArgumentParserExampleTests.CountLinesExampleTests testCountLines] : failed - Strings are not equal.
+ 20
- 'count-lines' isn't supported on this platform:
20
- Version 10.16 (Build 21G115)
@swift-ci Please test macOS platform
Resolved this in #576
Replace this paragraph with a description of your changes and rationale. Provide links to an existing issue or external references/discussions, if appropriate.
Checklist