Skip to content

No sample tests in swift package init --type executable --enable-swift-testing #8990

@MaxDesiatov

Description

@MaxDesiatov

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 package etc.

Description

Run swift package init --type executable --enable-swift-testing, the --enable-swift-testing flag has no effect.

Expected behavior

Tests directory should be provided with tests included.

Actual behavior

--enable-swift-testing flag has no effect, Tests directory is not created.

Steps to reproduce

No response

Swift Package Manager version/commit hash

release/6.1, also reproducible with swift-DEVELOPMENT-SNAPSHOT-2025-08-02-a

Swift & OS version (output of swift --version ; uname -a)

> swift --version
swift-driver version: 1.120.5 Apple Swift version 6.1.2 (swiftlang-6.1.2.1.2 clang-1700.0.13.5)
Target: arm64-apple-macosx15.0

> swift build --version
Swift Package Manager - Swift 6.1.0

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions