Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.9] Remove extra paths added to LD_LIBRARY_PATH on Linux when running tests #6691

Merged
Merged
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
10 changes: 0 additions & 10 deletions Sources/Commands/Utilities/TestingSupport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,6 @@ enum TestingSupport {
if let location = toolchain.xctestPath {
env.prependPath("Path", value: location.pathString)
}
#elseif os(Linux)
var libraryPaths = ["/usr/lib/swift/linux"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is clearly wrong and should be removed no matter if the others are.

if let path = env["PATH"], let firstPathEntry = path.components(separatedBy: ":").first {
libraryPaths.append("\(firstPathEntry)/../lib/swift/linux")
}
if let originalLibraryPaths = env["LD_LIBRARY_PATH"] {
libraryPaths.append(originalLibraryPaths)
}
// Pass this explicitly on Linux because XCTest started requiring it, rdar://103054033
env["LD_LIBRARY_PATH"] = libraryPaths.joined(separator: ":")
#endif
return env
#else
Expand Down