Uploaded image for project: 'Swift'
  1. Swift
  2. SR-12008

SwiftPM: On Linux, enable-test-discovery stumbles over deprecated tests

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: In Progress
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Package Manager
    • Labels:

      Description

      It's very important to also test deprecated functionality which on Darwin is easily possible by deprecating the test method. When manually generating LinuxMain and friends, this is also possible via a small hack.

      Repro:

      git clone https://github.com/apple/swift-nio
      cd swift-nio
      docker run -it --rm -v "$PWD:$PWD" -w "$PWD" swift:5.1.3 swift test -Xswiftc -warnings-as-errors --enable-test-discovery
      

      Expected:

      Runs the tests just fine like on Darwin or without enable-test-discovery

      Actual:

      many errors.

      /Users/johannes/devel/swift-nio/.build/x86_64-unknown-linux/debug/testlist.derived/NIOConcurrencyHelpersTests.swift:6:24: error: 'testAddSub()' is deprecated: deprecated because it tests deprecated functionality
              ("testAddSub", testAddSub),
                             ^
      /Users/johannes/devel/swift-nio/.build/x86_64-unknown-linux/debug/testlist.derived/NIOConcurrencyHelpersTests.swift:8:35: error: 'testAllOperationsBool()' is deprecated: deprecated because it tests deprecated functionality
              ("testAllOperationsBool", testAllOperationsBool),
                                        ^
      

        Attachments

          Activity

            People

            Assignee:
            3a4oT Petro Rovenskyy
            Reporter:
            jw Johannes Weiss
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: