Skip to content

Commit a01d192

Browse files
committed
Miscellaneous Windows test fixes
1 parent 0660812 commit a01d192

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

Tests/SWBBuildSystemTests/CustomTaskBuildOperationTests.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ fileprivate struct CustomTaskBuildOperationTests: CoreBasedTests {
6666
],
6767
customTasks: [
6868
TestCustomTask(
69-
commandLine: ["$(CONFIGURATION_BUILD_DIR)/tool"],
69+
commandLine: ["$(CONFIGURATION_BUILD_DIR)/\(destination.imageFormat(core).executableName(basename: "tool"))"],
7070
environment: environment,
7171
workingDirectory: tmpDir.str,
7272
executionDescription: "My Custom Task",
73-
inputs: ["$(CONFIGURATION_BUILD_DIR)/tool"],
73+
inputs: ["$(CONFIGURATION_BUILD_DIR)/\(destination.imageFormat(core).executableName(basename: "tool"))"],
7474
outputs: [Path.root.join("output").str],
7575
enableSandboxing: false,
7676
preparesForIndexing: false)

Tests/SWBCoreTests/CoreTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ import Foundation
178178
}
179179
}
180180

181-
@Test
181+
@Test(.requireHostOS(.macOS))
182182
func toolchainLoading() async throws {
183183
// Validate that we loaded the default toolchain.
184184
let defaultToolchain = try #require(await getCore().toolchainRegistry.lookup("default"), "no default toolchain")

Tests/SWBCoreTests/ShellScriptEnvironmentTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ import SWBTestSupport
157157
}
158158

159159
/// Test that default and overriding build settings defined in a toolchain are exported.
160-
@Test(.skipIfEnvironmentVariableSet(key: "EXTERNAL_TOOLCHAINS_DIR"))
160+
@Test(.requireHostOS(.macOS), .skipIfEnvironmentVariableSet(key: "EXTERNAL_TOOLCHAINS_DIR"))
161161
func exportingToolchainSettings() async throws {
162162
try await withTemporaryDirectory { tmpDirPath in
163163
// Toolchains are only loaded from the localFS, so we can't use a PseudoFS here.

Tests/SWBTaskConstructionTests/SwiftTaskConstructionTests.swift

+2-4
Original file line numberDiff line numberDiff line change
@@ -3932,12 +3932,11 @@ fileprivate struct SwiftTaskConstructionTests: CoreBasedTests {
39323932
targets: [
39333933
TestStandardTarget(
39343934
"TargetName",
3935-
type: .framework,
3935+
type: .dynamicLibrary,
39363936
buildConfigurations: [
39373937
TestBuildConfiguration("Debug", buildSettings: [
39383938
"SWIFT_WARNINGS_AS_WARNINGS_GROUPS": "Unsafe DeprecatedDeclaration",
39393939
"SWIFT_EXEC": swiftCompilerPath.str,
3940-
"CODE_SIGN_IDENTITY": "",
39413940
"SDKROOT": "$(HOST_PLATFORM)",
39423941
"SUPPORTED_PLATFORMS": "$(HOST_PLATFORM)",
39433942
]),
@@ -3978,12 +3977,11 @@ fileprivate struct SwiftTaskConstructionTests: CoreBasedTests {
39783977
targets: [
39793978
TestStandardTarget(
39803979
"TargetName",
3981-
type: .framework,
3980+
type: .dynamicLibrary,
39823981
buildConfigurations: [
39833982
TestBuildConfiguration("Debug", buildSettings: [
39843983
"SWIFT_WARNINGS_AS_ERRORS_GROUPS": "UnknownWarningGroup PreconcurrencyImport",
39853984
"SWIFT_EXEC": swiftCompilerPath.str,
3986-
"CODE_SIGN_IDENTITY": "",
39873985
"SDKROOT": "$(HOST_PLATFORM)",
39883986
"SUPPORTED_PLATFORMS": "$(HOST_PLATFORM)",
39893987
]),

Tests/SwiftBuildTests/ConsoleCommands/ServiceConsoleTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fileprivate struct ServiceConsoleTests {
3737
let output = String(decoding: data, as: UTF8.self)
3838

3939
// Verify there were no errors.
40-
#expect(output == "swbuild> \n")
40+
#expect(output == "swbuild> \(String.newline)")
4141

4242
// Assert the tool exited successfully.
4343
await #expect(try promise.value == .exit(0))

0 commit comments

Comments
 (0)