Skip to content

Toolchain fails to build when Swift Package Manager contains a Swift Testing Tests #79113

Closed
@bkhouri

Description

@bkhouri

Description

When Swift Package Manager contains a Swift Testing Tests, the OSS toolchain build contains compilation errors on swift Package Manager when building the tests.

/Users/ec2-user/jenkins/workspace/oss-swift-package-macos/swiftpm/Tests/BasicsTests/SampleTests.swift:1:8: error: no such module 'Testing'
import Testing
       ^

The Swift Testing test PR was reverted from Swift Package Manager swiftlang/swift-package-manager#8266, but we want to re-introduced the Swift Testing Canary test in Swift Package Manager ( see swiftlang/swift-package-manager#8267). However, if swiftlang/swift-package-manager#8267 is merged, the OSS toolchain will fail to build.

Looking the OSS Pipeline that failed, the swiftlang/swift/utils/build-script is executed and uses the build preset buildbot_osx_package.

The buildbot_osx_package preset has the mixin_osx_package_base preset, which specifies swift-testing and swift-testing-macros, in addition to specifying install-swift-testing and install-swift-testing-macros.

So the preset should contains swift testing. However, the build fails to find swift-testing.

Reproduction

To reproduce:

  1. Open swiftpm: Test only running host platform architecture #79074
  2. Trigger the macOS OSS toolchain build by posting the following comment
test with following PR:
https://github.com/swiftlang/swift-package-manager/pull/8267

@swift-ci build Toolchain macOS

Expected behavior

Once swiftlang/swift-package-manager#8267 is merged, an OSS toolchain build does not not cause a "no such module 'Testing'` compilation error.

Environment

Observed in the OSS CI pipeline .

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.triage neededThis issue needs more specific labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions