Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,13 @@ extension PackagePIFProjectBuilder {
// This should eventually be set universally for all package targets/products.
settings[.LINKER_DRIVER] = "swiftc"

// A test-runner should always be adjacent to the dynamic library containing the tests,
// so add the appropriate rpaths.
settings[.LD_RUNPATH_SEARCH_PATHS] = [
"$(inherited)",
"$(RPATH_ORIGIN)"
]

let deploymentTargets = unitTestProduct.deploymentTargets
settings[.MACOSX_DEPLOYMENT_TARGET] = deploymentTargets?[.macOS] ?? nil
settings[.IPHONEOS_DEPLOYMENT_TARGET] = deploymentTargets?[.iOS] ?? nil
Expand Down
5 changes: 2 additions & 3 deletions Tests/CommandsTests/TestCommandTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -663,8 +663,7 @@ struct TestCommandTests {
}
}
} when: {
(buildSystem == .swiftbuild && .linux == ProcessInfo.hostOperatingSystem)
|| ProcessInfo.hostOperatingSystem == .windows
ProcessInfo.hostOperatingSystem == .windows
}
}

Expand Down Expand Up @@ -1011,7 +1010,7 @@ struct TestCommandTests {
)
}
} when: {
buildSystem == .swiftbuild && ProcessInfo.hostOperatingSystem != .macOS
buildSystem == .swiftbuild && ProcessInfo.hostOperatingSystem == .windows
}
}

Expand Down