@@ -7390,14 +7390,10 @@ final class SwiftDriverTests: XCTestCase {
7390
7390
7391
7391
func testRelativeResourceDir( ) throws {
7392
7392
do {
7393
- // Reset the environment to avoid 'SDKROOT' influencing the
7394
- // linux driver paths and taking the priority over the resource directory.
7395
- var env = ProcessEnv . vars
7396
- env [ " SDKROOT " ] = nil
7397
7393
var driver = try Driver ( args: [ " swiftc " ,
7398
7394
" -target " , " x86_64-unknown-linux " , " -lto=llvm-thin " ,
7399
7395
" foo.swift " ,
7400
- " -resource-dir " , " resource/dir " ] , env : env )
7396
+ " -resource-dir " , " resource/dir " ] )
7401
7397
let plannedJobs = try driver. planBuild ( ) . removingAutolinkExtractJobs ( )
7402
7398
7403
7399
let compileJob = plannedJobs [ 0 ]
@@ -7412,7 +7408,7 @@ final class SwiftDriverTests: XCTestCase {
7412
7408
}
7413
7409
}
7414
7410
7415
- func testSDKDirLinuxPrioritizedOverRelativeResourceDirForLinkingSwiftRT ( ) throws {
7411
+ func testRelativeResourceDirLinuxPrioritizedOverSDKDirForLinkingSwiftRT ( ) throws {
7416
7412
do {
7417
7413
let sdkRoot = try testInputsPath. appending ( component: " mock-sdk.sdk " )
7418
7414
var env = ProcessEnv . vars
@@ -7426,7 +7422,7 @@ final class SwiftDriverTests: XCTestCase {
7426
7422
XCTAssertEqual ( compileJob. kind, . compile)
7427
7423
let linkJob = plannedJobs [ 1 ]
7428
7424
XCTAssertEqual ( linkJob. kind, . link)
7429
- try XCTAssertJobInvocationMatches ( linkJob, toPathOption ( sdkRoot . pathString + " /usr/lib/swift/ linux/x86_64/swiftrt.o" , isRelative : false ) )
7425
+ try XCTAssertJobInvocationMatches ( linkJob, toPathOption ( " resource/dir/ linux/x86_64/swiftrt.o" ) )
7430
7426
}
7431
7427
}
7432
7428
0 commit comments