@@ -7389,14 +7389,10 @@ final class SwiftDriverTests: XCTestCase {
7389
7389
7390
7390
func testRelativeResourceDir( ) throws {
7391
7391
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
7396
7392
var driver = try Driver ( args: [ " swiftc " ,
7397
7393
" -target " , " x86_64-unknown-linux " , " -lto=llvm-thin " ,
7398
7394
" foo.swift " ,
7399
- " -resource-dir " , " resource/dir " ] , env : env )
7395
+ " -resource-dir " , " resource/dir " ] )
7400
7396
let plannedJobs = try driver. planBuild ( ) . removingAutolinkExtractJobs ( )
7401
7397
7402
7398
let compileJob = plannedJobs [ 0 ]
@@ -7411,7 +7407,7 @@ final class SwiftDriverTests: XCTestCase {
7411
7407
}
7412
7408
}
7413
7409
7414
- func testSDKDirLinuxPrioritizedOverRelativeResourceDirForLinkingSwiftRT ( ) throws {
7410
+ func testRelativeResourceDirLinuxPrioritizedOverSDKDirForLinkingSwiftRT ( ) throws {
7415
7411
do {
7416
7412
let sdkRoot = try testInputsPath. appending ( component: " mock-sdk.sdk " )
7417
7413
var env = ProcessEnv . block
@@ -7425,7 +7421,7 @@ final class SwiftDriverTests: XCTestCase {
7425
7421
XCTAssertEqual ( compileJob. kind, . compile)
7426
7422
let linkJob = plannedJobs [ 1 ]
7427
7423
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" ) )
7429
7425
}
7430
7426
}
7431
7427
0 commit comments