Commit f53c2ab
committed
Resolve an issue building test products.
After #7353 landed, I noticed that the build products for test targets were not
being emitted correctly. swift-testing and XCTest produce separate build
products (with distinct names) but this wasn't happening as intended. It turns
out that the changes to split `buildParameters` into `productsBuildParameters`
and `toolsBuildParameters` weren't fully propagated to our testing
infrastructure.
I also noticed `SWIFT_PM_SUPPORTS_SWIFT_TESTING` wasn't being set correctly
anymore (same root cause) although we've decided to ignore that flag over in
swift-testing anyway (see swiftlang/swift-testing#376.)
This regression caused build failures in swift-testing (e.g. [here](https://ci.swift.org/job/pr-swift-testing-macos/663/console))
with the telltale failure signature:
> /Users/ec2-user/jenkins/workspace/pr-swift-testing-macos/branch-main/swift-testing/.build/x86_64-apple-macosx/debug/swift-testingPackageTests.xctest/Contents/MacOS/swift-testingPackageTests: /Users/ec2-user/jenkins/workspace/pr-swift-testing-macos/branch-main/swift-testing/.build/x86_64-apple-macosx/debug/swift-testingPackageTests.xctest/Contents/MacOS/swift-testingPackageTests: cannot execute binary file
Which indicates that it thinks the filename for the swift-testing build product
is the XCTest bundle's executable.
This PR plumbs through the two build parameters arguments to everywhere in
`swift test` and `swift build` that needs them and resolves the issue.1 parent 3f9587c commit f53c2ab
File tree
3 files changed
+101
-55
lines changed- Sources/Commands
- Utilities
3 files changed
+101
-55
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
153 | | - | |
| 152 | + | |
154 | 153 | | |
155 | 154 | | |
156 | 155 | | |
| |||
161 | 160 | | |
162 | 161 | | |
163 | 162 | | |
164 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
165 | 170 | | |
166 | 171 | | |
167 | | - | |
| 172 | + | |
168 | 173 | | |
169 | 174 | | |
170 | 175 | | |
171 | | - | |
| 176 | + | |
172 | 177 | | |
173 | 178 | | |
174 | 179 | | |
175 | | - | |
| 180 | + | |
| 181 | + | |
176 | 182 | | |
177 | 183 | | |
178 | 184 | | |
| |||
0 commit comments