Skip to content

swift build --product package-namePackageTest doesn't build swift-testing tests #7374

Closed
@weissi

Description

@weissi

Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?

  • Confirmed reproduction steps with SwiftPM CLI.

Description

When I run swift build --product package-namePackageTest it doesn't build the swift-testing tests.

Expected behavior

Builds swift-testing tests.

Actual behavior

Doesn't build swift-testing tests.

error: posix_spawn error: No such file or directory (2), `["/tmp/package-name/.build/arm64-apple-macosx/debug/package-namePackageTests.swift-testing", "--list-tests"]`
error: ExitCode(rawValue: 1)
[0/1] Planning builderror: no tests found; create a target in the 'Tests' directory

Steps to reproduce

  1. Get hold of a package that uses swift-testing
  2. rm -rf .build # to make sure this is clean
  3. swift build --product package-namePackageTest
  4. swift test list --skip-build

Swift Package Manager version/commit hash

No response

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

No response

Metadata

Metadata

Assignees

Labels

bugswift buildChanges impacting `swift build`swift testChanges impacting `swift test` tool

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions