@@ -7389,14 +7389,10 @@ final class SwiftDriverTests: XCTestCase {
73897389
73907390 func testRelativeResourceDir( ) throws {
73917391 do {
7392- // Reset the environment to avoid 'SDKROOT' influencing the
7393- // linux driver paths and taking the priority over the resource directory.
7394- var env = ProcessEnv . block
7395- env [ " SDKROOT " ] = nil
73967392 var driver = try Driver ( args: [ " swiftc " ,
73977393 " -target " , " x86_64-unknown-linux " , " -lto=llvm-thin " ,
73987394 " foo.swift " ,
7399- " -resource-dir " , " resource/dir " ] , env : env )
7395+ " -resource-dir " , " resource/dir " ] )
74007396 let plannedJobs = try driver. planBuild ( ) . removingAutolinkExtractJobs ( )
74017397
74027398 let compileJob = plannedJobs [ 0 ]
@@ -7411,7 +7407,7 @@ final class SwiftDriverTests: XCTestCase {
74117407 }
74127408 }
74137409
7414- func testSDKDirLinuxPrioritizedOverRelativeResourceDirForLinkingSwiftRT ( ) throws {
7410+ func testRelativeResourceDirLinuxPrioritizedOverSDKDirForLinkingSwiftRT ( ) throws {
74157411 do {
74167412 let sdkRoot = try testInputsPath. appending ( component: " mock-sdk.sdk " )
74177413 var env = ProcessEnv . block
@@ -7425,7 +7421,7 @@ final class SwiftDriverTests: XCTestCase {
74257421 XCTAssertEqual ( compileJob. kind, . compile)
74267422 let linkJob = plannedJobs [ 1 ]
74277423 XCTAssertEqual ( linkJob. kind, . link)
7428- try XCTAssertJobInvocationMatches ( linkJob, toPathOption ( sdkRoot . pathString + " /usr/lib/swift/ linux/x86_64/swiftrt.o" , isRelative : false ) )
7424+ try XCTAssertJobInvocationMatches ( linkJob, toPathOption ( " resource/dir/ linux/x86_64/swiftrt.o" ) )
74297425 }
74307426 }
74317427
0 commit comments