 
         // test if tools directory is respected
         do {
-          var driver = try Driver(args: ["swiftc", "-print-target-info", "-tools-directory", toolsDirectory.pathString])
+          var driver = try Driver(args: ["swiftc", "-print-target-info", "-tools-directory", toolsDirectory.pathString],
+                                  env: [PATH: ProcessEnv.path!])
           let jobs = try driver.planBuild()
           XCTAssertEqual(jobs.count, 1)
           XCTAssertEqual(jobs.first!.tool.name, customSwiftFrontend.pathString)

  }

  func testToolSearching() throws {
    var driver = try Driver(args: ["swiftc", "-print-target-info"])
    let jobs = try driver.planBuild()
    XCTAssertEqual(jobs.count, 1)
    let defaultSwiftFrontend = jobs.first!.tool.absolutePath!

    try withTemporaryDirectory { toolsDirectory in
      let customSwiftFrontend = toolsDirectory.appending(component: executableName("swift-frontend"))
      try localFileSystem.createSymbolicLink(customSwiftFrontend, pointingAt: defaultSwiftFrontend, relative: false)

      try withTemporaryDirectory { tempDirectory in 
        try localFileSystem.changeCurrentWorkingDirectory(to: tempDirectory)
