Skip to content
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

[SR-12711] Test Discovery Fails When Test Target Contains Non-Alphanum Chars #55156

Closed
Frizlab opened this issue Apr 30, 2020 · 3 comments
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@Frizlab
Copy link

Frizlab commented Apr 30, 2020

Previous ID SR-12711
Radar rdar://problem/62895076
Original Reporter @Frizlab
Type Bug
Environment

In a swift:5.2 docker container (Swift 5.2.2); also tested with Swift 5.2.3 Linux (using the happn/swift:5.2.3-RELEASE image).

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

md5: 46891d36ec96be3b84d469040a1bf251

Issue Description:

Create a Package.swift like this

// swift-tools-version:5.2
import PackageDescription

let package = Package(
    name: "happn-swift",
    targets: [
        .target(name: "happn-swift", dependencies: []),
        .testTarget(name: "happn-swiftTests", dependencies: ["happn-swift"])
    ]
)

with the proper architecture around it.

Run swift test --enable-test-discovery on Linux.

Expected result: The test in the happn-swiftTests are run.

Actual result: We get the following compilation error

/tmp/.build/x86_64-unknown-linux-gnu/debug/happn-swiftPackageTestsTestlist.derived/main.swift:4:10: error: use of unresolved identifier '__allTests_happn_swiftTests'
tests += __allTests_happn_swiftTests()

Renaming the test target to happnSwiftTests (and updating the related folder name) does fix the test discovery.

@beccadax
Copy link
Contributor

beccadax commented May 5, 2020

@swift-ci create

@Frizlab
Copy link
Author

Frizlab commented Nov 26, 2020

Confirmed to still fail the same way with the swift:5.3.1 docker image.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@Frizlab
Copy link
Author

Frizlab commented Aug 15, 2023

Fixed in swift:5.8.1 image (at least; it was probably fixed before that).

@Frizlab Frizlab closed this as completed Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Projects
None yet
Development

No branches or pull requests

2 participants