You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add missing libcurl4-openssl-dev dependency in Ubuntu/Debian packages, add more EndToEnd testcases (#236)
As outlined in #197, the generator was not downloading the needed `libcurl4-openssl-dev` dependency that is required to statically link `FoundationNetworking` with `--static-swift-stdlib`.
This PR adds the needed dependency for all supported Ubuntu and Debian versions with a little bit of refactoring in `LinuxDistribution.swift` to reduce duplication of common dependencies across versions.
I also added an additional testcase in the `EndToEndTests` to verify this curl dependency is available and works. With this change is some improvements to the logging of the EndToEndTests, so we end up with the following output:
```
2025-08-15T13:42:09+0000 info EndToEndTests: temporaryDirectory=/tmp/6E93604C-CC84-4E25-A67E-F947CE19D282 [SwiftSDKGeneratorTests] Created temporary directory
2025-08-15T13:42:09+0000 info EndToEndTests: scratchPath=/tmp/6E93604C-CC84-4E25-A67E-F947CE19D282 [SwiftSDKGeneratorTests] Building SDK generator
2025-08-15T13:44:22+0000 info EndToEndTests: runArguments=--sdk-name ubuntu_24.04_x86_64_6.1-RELEASE --host-toolchain --swift-version 6.1-RELEASE --target x86_64-unknown-linux-gnu --distribution-name ubuntu --distribution-version 24.04 scratchPath=/tmp/6E93604C-CC84-4E25-A67E-F947CE19D282 [SwiftSDKGeneratorTests] Building Swift SDK
2025-08-15T13:45:35+0000 info EndToEndTests: bundleName=ubuntu_24.04_x86_64_6.1-RELEASE scratchPath=/tmp/6E93604C-CC84-4E25-A67E-F947CE19D282 [SwiftSDKGeneratorTests] Installing new Swift SDK
2025-08-15T13:45:50+0000 info EndToEndTests: temporaryDirectory=/tmp/6E93604C-CC84-4E25-A67E-F947CE19D282 [SwiftSDKGeneratorTests] Removed temporary directory
2025-08-15T13:45:50+0000 info EndToEndTests: bundleName=ubuntu_24.04_x86_64_6.1-RELEASE [SwiftSDKGeneratorTests] Running test cases...
2025-08-15T13:45:50+0000 info EndToEndTests: bundleName=ubuntu_24.04_x86_64_6.1-RELEASE temporaryDirectory=/tmp/8688FF7E-C08E-4ED6-A218-304D4AB9D88E testcase=helloWorld [SwiftSDKGeneratorTests] Created temporary directory
2025-08-15T13:45:50+0000 info EndToEndTests: bundleName=ubuntu_24.04_x86_64_6.1-RELEASE testcase=helloWorld [SwiftSDKGeneratorTests] Creating test project /tmp/8688FF7E-C08E-4ED6-A218-304D4AB9D88E/swift-sdk-generator-test
2025-08-15T13:45:50+0000 info EndToEndTests: bundleName=ubuntu_24.04_x86_64_6.1-RELEASE testcase=helloWorld [SwiftSDKGeneratorTests] Building test project
2025-08-15T13:46:08+0000 info EndToEndTests: bundleName=ubuntu_24.04_x86_64_6.1-RELEASE testcase=helloWorld [SwiftSDKGeneratorTests] Test project built successfully
2025-08-15T13:46:08+0000 info EndToEndTests: bundleName=ubuntu_24.04_x86_64_6.1-RELEASE testcase=helloWorld [SwiftSDKGeneratorTests] Building test project with static-swift-stdlib
2025-08-15T13:46:11+0000 info EndToEndTests: bundleName=ubuntu_24.04_x86_64_6.1-RELEASE testcase=helloWorld [SwiftSDKGeneratorTests] Test project built successfully
2025-08-15T13:46:11+0000 info EndToEndTests: bundleName=ubuntu_24.04_x86_64_6.1-RELEASE temporaryDirectory=/tmp/8688FF7E-C08E-4ED6-A218-304D4AB9D88E testcase=helloWorld [SwiftSDKGeneratorTests] Removed temporary directory
2025-08-15T13:46:11+0000 info EndToEndTests: bundleName=ubuntu_24.04_x86_64_6.1-RELEASE temporaryDirectory=/tmp/312A6E7E-95DF-4BCE-8D18-9E7EF1D163F6 testcase=curlDependency [SwiftSDKGeneratorTests] Created temporary directory
2025-08-15T13:46:11+0000 info EndToEndTests: bundleName=ubuntu_24.04_x86_64_6.1-RELEASE testcase=curlDependency [SwiftSDKGeneratorTests] Creating test project /tmp/312A6E7E-95DF-4BCE-8D18-9E7EF1D163F6/swift-sdk-generator-test
2025-08-15T13:46:11+0000 info EndToEndTests: bundleName=ubuntu_24.04_x86_64_6.1-RELEASE testcase=curlDependency [SwiftSDKGeneratorTests] Building test project
2025-08-15T13:46:19+0000 info EndToEndTests: bundleName=ubuntu_24.04_x86_64_6.1-RELEASE testcase=curlDependency [SwiftSDKGeneratorTests] Test project built successfully
2025-08-15T13:46:19+0000 info EndToEndTests: bundleName=ubuntu_24.04_x86_64_6.1-RELEASE testcase=curlDependency [SwiftSDKGeneratorTests] Building test project with static-swift-stdlib
2025-08-15T13:46:24+0000 info EndToEndTests: bundleName=ubuntu_24.04_x86_64_6.1-RELEASE testcase=curlDependency [SwiftSDKGeneratorTests] Test project built successfully
2025-08-15T13:46:24+0000 info EndToEndTests: bundleName=ubuntu_24.04_x86_64_6.1-RELEASE temporaryDirectory=/tmp/312A6E7E-95DF-4BCE-8D18-9E7EF1D163F6 testcase=curlDependency [SwiftSDKGeneratorTests] Removed temporary directory
2025-08-15T13:46:24+0000 info EndToEndTests: bundleName=ubuntu_24.04_x86_64_6.1-RELEASE temporaryDirectory=/tmp/4B1AB5C9-3C87-4258-8BA0-97B305B59970 testcase=libcNonshared [SwiftSDKGeneratorTests] Created temporary directory
2025-08-15T13:46:24+0000 info EndToEndTests: bundleName=ubuntu_24.04_x86_64_6.1-RELEASE testcase=libcNonshared [SwiftSDKGeneratorTests] Creating test project /tmp/4B1AB5C9-3C87-4258-8BA0-97B305B59970/swift-sdk-generator-test
2025-08-15T13:46:24+0000 info EndToEndTests: bundleName=ubuntu_24.04_x86_64_6.1-RELEASE testcase=libcNonshared [SwiftSDKGeneratorTests] Building test project
2025-08-15T13:46:30+0000 info EndToEndTests: bundleName=ubuntu_24.04_x86_64_6.1-RELEASE testcase=libcNonshared [SwiftSDKGeneratorTests] Test project built successfully
2025-08-15T13:46:30+0000 info EndToEndTests: bundleName=ubuntu_24.04_x86_64_6.1-RELEASE testcase=libcNonshared [SwiftSDKGeneratorTests] Building test project with static-swift-stdlib
2025-08-15T13:46:36+0000 info EndToEndTests: bundleName=ubuntu_24.04_x86_64_6.1-RELEASE testcase=libcNonshared [SwiftSDKGeneratorTests] Test project built successfully
2025-08-15T13:46:36+0000 info EndToEndTests: bundleName=ubuntu_24.04_x86_64_6.1-RELEASE temporaryDirectory=/tmp/4B1AB5C9-3C87-4258-8BA0-97B305B59970 testcase=libcNonshared [SwiftSDKGeneratorTests] Removed temporary directory
2025-08-15T13:46:36+0000 info EndToEndTests: bundleName=ubuntu_24.04_x86_64_6.1-RELEASE [SwiftSDKGeneratorTests] Removing Swift SDK to clean up...
warning: `swift experimental-sdk` command is deprecated and will be removed in a future version of SwiftPM. Use `swift sdk` instead.
```
If you notice in the above, we now have:
- Separate logging of building the SDK generator and actually building the Swift SDK.
- Cleaner logging of removing and installing Swift SDKs.
- Each testcase now has a key that gives the name of the testcase, that is logged in the "testcase" metadata key to identify which may work or fail.
- Testcases are run concurrently with a throwing task group. As we add more testcases in the future this helps to reduce the time it takes to run each case.
0 commit comments