@@ -7159,14 +7159,10 @@ final class SwiftDriverTests: XCTestCase {
7159
7159
7160
7160
func testRelativeResourceDir( ) throws {
7161
7161
do {
7162
- // Reset the environment to avoid 'SDKROOT' influencing the
7163
- // linux driver paths and taking the priority over the resource directory.
7164
- var env = ProcessEnv . vars
7165
- env [ " SDKROOT " ] = nil
7166
7162
var driver = try Driver ( args: [ " swiftc " ,
7167
7163
" -target " , " x86_64-unknown-linux " , " -lto=llvm-thin " ,
7168
7164
" foo.swift " ,
7169
- " -resource-dir " , " resource/dir " ] , env : env )
7165
+ " -resource-dir " , " resource/dir " ] )
7170
7166
let plannedJobs = try driver. planBuild ( ) . removingAutolinkExtractJobs ( )
7171
7167
7172
7168
let compileJob = plannedJobs [ 0 ]
@@ -7181,7 +7177,7 @@ final class SwiftDriverTests: XCTestCase {
7181
7177
}
7182
7178
}
7183
7179
7184
- func testSDKDirLinuxPrioritizedOverRelativeResourceDirForLinkingSwiftRT ( ) throws {
7180
+ func testRelativeResourceDirLinuxPrioritizedOverSDKDirForLinkingSwiftRT ( ) throws {
7185
7181
do {
7186
7182
let sdkRoot = try testInputsPath. appending ( component: " mock-sdk.sdk " )
7187
7183
var env = ProcessEnv . vars
@@ -7195,7 +7191,7 @@ final class SwiftDriverTests: XCTestCase {
7195
7191
XCTAssertEqual ( compileJob. kind, . compile)
7196
7192
let linkJob = plannedJobs [ 1 ]
7197
7193
XCTAssertEqual ( linkJob. kind, . link)
7198
- try XCTAssertJobInvocationMatches ( linkJob, toPathOption ( sdkRoot . pathString + " /usr/lib/swift/ linux/x86_64/swiftrt.o" , isRelative : false ) )
7194
+ try XCTAssertJobInvocationMatches ( linkJob, toPathOption ( " resource/dir/ linux/x86_64/swiftrt.o" ) )
7199
7195
}
7200
7196
}
7201
7197
0 commit comments