@@ -7229,14 +7229,10 @@ final class SwiftDriverTests: XCTestCase {
7229
7229
7230
7230
func testRelativeResourceDir( ) throws {
7231
7231
do {
7232
- // Reset the environment to avoid 'SDKROOT' influencing the
7233
- // linux driver paths and taking the priority over the resource directory.
7234
- var env = ProcessEnv . block
7235
- env [ " SDKROOT " ] = nil
7236
7232
var driver = try Driver ( args: [ " swiftc " ,
7237
7233
" -target " , " x86_64-unknown-linux " , " -lto=llvm-thin " ,
7238
7234
" foo.swift " ,
7239
- " -resource-dir " , " resource/dir " ] , env : env )
7235
+ " -resource-dir " , " resource/dir " ] )
7240
7236
let plannedJobs = try driver. planBuild ( ) . removingAutolinkExtractJobs ( )
7241
7237
7242
7238
let compileJob = plannedJobs [ 0 ]
@@ -7251,7 +7247,7 @@ final class SwiftDriverTests: XCTestCase {
7251
7247
}
7252
7248
}
7253
7249
7254
- func testSDKDirLinuxPrioritizedOverRelativeResourceDirForLinkingSwiftRT ( ) throws {
7250
+ func testRelativeResourceDirLinuxPrioritizedOverSDKDirForLinkingSwiftRT ( ) throws {
7255
7251
do {
7256
7252
let sdkRoot = try testInputsPath. appending ( component: " mock-sdk.sdk " )
7257
7253
var env = ProcessEnv . block
@@ -7265,7 +7261,7 @@ final class SwiftDriverTests: XCTestCase {
7265
7261
XCTAssertEqual ( compileJob. kind, . compile)
7266
7262
let linkJob = plannedJobs [ 1 ]
7267
7263
XCTAssertEqual ( linkJob. kind, . link)
7268
- try XCTAssertJobInvocationMatches ( linkJob, toPathOption ( sdkRoot . pathString + " /usr/lib/swift/ linux/x86_64/swiftrt.o" , isRelative : false ) )
7264
+ try XCTAssertJobInvocationMatches ( linkJob, toPathOption ( " resource/dir/ linux/x86_64/swiftrt.o" ) )
7269
7265
}
7270
7266
}
7271
7267
0 commit comments