swiftlang/swift-package-manager
Tests in `swift package init --type executable --enable-swift-testing` have no test target
Chiusa
#9149 aperta il 17 set 2025
bugcommand-line interfacegood first issueswift package initswift test
Metriche repository
- Star
- (10.145 stelle)
- Metriche merge PR
- (Merge medio 9g 4h) (62 PR mergiate in 30 g)
Descrizione
Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?
- Confirmed reproduction steps with SwiftPM CLI. The description text must include reproduction steps with either of command-line SwiftPM commands,
swift build,swift test,swift packageetc.
Description
Run swift package init --type executable --enable-swift-testing.
Expected behavior
Tests directory that was created should have a corresponding test target in Package.swift
Actual behavior
Package.swift has not corresponding test target.
Swift Package Manager version/commit hash
main, also reproducible with swift-DEVELOPMENT-SNAPSHOT-2025-09-14-a
Swift & OS version (output of swift --version ; uname -a)
> swift --version
Apple Swift version 6.3-dev (LLVM 73f0f4667f22bd1, Swift c987ea9c8e684c2)
Target: arm64-apple-macosx15.0
> swift build --version
Swift Package Manager - Swift 6.3.0-dev