[SwiftBuild] Classify swiftpm-test-runner as a tool product in SwiftBuild
bugswiftbuild backend
## Description
The SwiftPM synthetic test runner is an executable, but SwiftBuild's product classification for the wasm Swift SDK flow does not currently line up with SwiftPM's expectations for `com.apple.product-type.tool.swiftpm-test-runner`. The minimum reproducer builds the package's umbrella test product through a command plugin and compares `--build-system native` with `--build-system swiftbuild`.
## Expected behavior
`com.apple.product-type.tool.swiftpm-test-runner` should be treated as a tool/executable product for WebAssembly Swift SDK builds.
For the reproducer, SwiftBuild should surface a usable executable artifact for the synthetic `RunnerReproPackageTests` test runner, matching the native build-system behavior.
## Actual behavior
With the June 12 snapshot and `swift-DEVELOPMENT-SNAPSHOT-2026-06-12-a_wasm`, the native build succeeds and completes the umbrella test product:
```text
succeeded: true
Build of product 'RunnerReproPackageTests' complete!
```
The SwiftBuild path fails in the synthetic test-runner build with the original failure mode:
```text
error: unable to find sdk 'webassembly'
error: Build failed
succeeded: false
```
## Steps to reproduce
1. Download the updated minimum reproducer zip: `https://gist.githubusercontent.com/kateinoigakukun/ba21c654a675032aa77906877c906e53/raw/5e90e1ee0202c4969d383ca624eb55725d9942ab/779-swiftpm-test-runner-product-type-linux-2026-06-12.zip`
2. Unzip it.
3. Enter the extracted `779-swiftpm-test-runner-product-type` package directory.
4. Run:
```bash
./repro-linux-2026-06-12.sh
```
## Swift Package Manager version/commit hash
```text
Swift Package Manager - Swift 6.5.0-dev
```
## Swift & OS version (output of `swift --version ; uname -a`)
```text
Swift version 6.5-dev (LLVM 18d2bfb70c14d89, Swift c13d82e5987aecb)
Target: x86_64-unknown-linux-gnu
Build config: +assertions
Linux swift-dev.fugu.katei.dev 6.8.0-94-generic #96-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 9 20:36:55 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
```
关闭于 2026-06-30 1 条评论