Skip to content

[DNM] checking macOS CI#575

Closed
MaxDesiatov wants to merge 2 commits into
mainfrom
maxd/ci-test
Closed

[DNM] checking macOS CI#575
MaxDesiatov wants to merge 2 commits into
mainfrom
maxd/ci-test

Conversation

@MaxDesiatov
Copy link
Copy Markdown
Member

Replace this paragraph with a description of your changes and rationale. Provide links to an existing issue or external references/discussions, if appropriate.

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

@MaxDesiatov
Copy link
Copy Markdown
Member Author

@swift-ci test

@rauhul
Copy link
Copy Markdown
Collaborator

rauhul commented Jun 22, 2023

@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?

@rauhul
Copy link
Copy Markdown
Collaborator

rauhul commented Jun 22, 2023

@swift-ci please test macOS

@natecook1000
Copy link
Copy Markdown
Member

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)

@natecook1000
Copy link
Copy Markdown
Member

@swift-ci Please test macOS platform

@natecook1000
Copy link
Copy Markdown
Member

Resolved this in #576

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants