From 6056144715961c79a76d70b3a92a865c16401a8d Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Fri, 24 Jan 2025 12:44:49 +0000 Subject: [PATCH] tests: End to end tests still require host toolchains The end to end tests still assume that the host toolchain will be embedded in the SDK. There is currently no provision in the test harness for installing a toolchain before running the tests, so for now we must use the --host-toolchain flag when building SDKs. --- Tests/SwiftSDKGeneratorTests/EndToEndTests.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tests/SwiftSDKGeneratorTests/EndToEndTests.swift b/Tests/SwiftSDKGeneratorTests/EndToEndTests.swift index f429242..ffbfc26 100644 --- a/Tests/SwiftSDKGeneratorTests/EndToEndTests.swift +++ b/Tests/SwiftSDKGeneratorTests/EndToEndTests.swift @@ -124,7 +124,7 @@ final class RepeatedBuildTests: XCTestCase { // Test that an existing SDK can be rebuilt without cleaning up. // Test with no arguments by default: - var possibleArguments = [""] + var possibleArguments = ["--host-toolchain"] do { try await Shell.run("docker ps") possibleArguments.append("--with-docker --linux-distribution-name rhel --linux-distribution-version ubi9") @@ -176,6 +176,7 @@ struct SDKConfiguration { var sdkGeneratorArguments: String { return [ "--sdk-name \(bundleName)", + "--host-toolchain", withDocker ? "--with-docker" : nil, "--swift-version \(swiftVersion)-RELEASE", testLinuxSwiftSDKs ? "--host \(hostArch!)-unknown-linux-gnu" : nil,