Skip to content

[SR-15230] Test discovery on Linux fails with tests tagged as async #57552

Closed
@adam-fowler

Description

@adam-fowler
Previous ID SR-15230
Radar rdar://problem/83412369
Original Reporter @adam-fowler
Type Bug
Status Closed
Resolution Done
Environment

Running using Docker with image `swift:5.5`

Additional Detail from JIRA
Votes 4
Component/s
Labels Bug
Assignee None
Priority Medium

md5: 3ade2f7a79e110975de18b321e2bf9c5

Issue Description:

When running tests on Linux the test discovery fails when running on a test that is tagged as `async`

The following code will cause a crash when running `swift test`

class MyTests: XCTestCase {
    func testAsync() async throws {}
}

It outputs the following error

error: invalid conversion from 'async' function of type '() async throws -> ()' to synchronous function type '() throws -> Void'
         testCase(MyTests.__allTests__MyTests),
                          ^

Async tests work when compiling for macOS in Xcode so they should be expected to work on Linux as well

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions