@@ -7277,14 +7277,10 @@ final class SwiftDriverTests: XCTestCase {
7277
7277
7278
7278
func testRelativeResourceDir( ) throws {
7279
7279
do {
7280
- // Reset the environment to avoid 'SDKROOT' influencing the
7281
- // linux driver paths and taking the priority over the resource directory.
7282
- var env = ProcessEnv . block
7283
- env [ " SDKROOT " ] = nil
7284
7280
var driver = try Driver ( args: [ " swiftc " ,
7285
7281
" -target " , " x86_64-unknown-linux " , " -lto=llvm-thin " ,
7286
7282
" foo.swift " ,
7287
- " -resource-dir " , " resource/dir " ] , env : env )
7283
+ " -resource-dir " , " resource/dir " ] )
7288
7284
let plannedJobs = try driver. planBuild ( ) . removingAutolinkExtractJobs ( )
7289
7285
7290
7286
let compileJob = plannedJobs [ 0 ]
@@ -7299,7 +7295,7 @@ final class SwiftDriverTests: XCTestCase {
7299
7295
}
7300
7296
}
7301
7297
7302
- func testSDKDirLinuxPrioritizedOverRelativeResourceDirForLinkingSwiftRT ( ) throws {
7298
+ func testRelativeResourceDirLinuxPrioritizedOverSDKDirForLinkingSwiftRT ( ) throws {
7303
7299
do {
7304
7300
let sdkRoot = try testInputsPath. appending ( component: " mock-sdk.sdk " )
7305
7301
var env = ProcessEnv . block
@@ -7313,7 +7309,7 @@ final class SwiftDriverTests: XCTestCase {
7313
7309
XCTAssertEqual ( compileJob. kind, . compile)
7314
7310
let linkJob = plannedJobs [ 1 ]
7315
7311
XCTAssertEqual ( linkJob. kind, . link)
7316
- try XCTAssertJobInvocationMatches ( linkJob, toPathOption ( sdkRoot . pathString + " /usr/lib/swift/ linux/x86_64/swiftrt.o" , isRelative : false ) )
7312
+ try XCTAssertJobInvocationMatches ( linkJob, toPathOption ( " resource/dir/ linux/x86_64/swiftrt.o" ) )
7317
7313
}
7318
7314
}
7319
7315
0 commit comments