       try? driver.run(jobs: jobs)
     }
 
+    let allArgs = args + extraArguments
     if checkDiagnostics {
-      try assertDriverDiagnostics(args: args) {driver, verifier in
+      try assertDriverDiagnostics(args: allArgs) {driver, verifier in
         verifier.forbidUnexpected(.error, .warning, .note, .remark, .ignored)
         expectations.forEach {verifier.expect($0)}
         if driver.isAutolinkExtractJobNeeded {

      let diagnosticEngine = DiagnosticsEngine(handlers: [
        {print($0, to: &stderrStream); stderrStream.flush()}
      ])
      var driver = try Driver(args: args, env: ProcessEnv.vars,
                              diagnosticsEngine: diagnosticEngine,
                              fileSystem: localFileSystem)
      doIt(&driver)

  }
  func doABuild(_ message: String,
                checkDiagnostics: Bool,
                extraArguments: [String] = [],
                expectingRemarks texts: [String],
                whenAutolinking: [String]) throws {
    try doABuild(
      message,
      checkDiagnostics: checkDiagnostics,
      extraArguments: extraArguments,
      expecting: texts.map {.remark($0)},
      expectingWhenAutolinking: whenAutolinking.map {.remark($0)})
  }

  func doABuild(_ message: String,
                checkDiagnostics: Bool,
                extraArguments: [String] = [],
                expecting expectations: [Diagnostic.Message],
                expectingWhenAutolinking autolinkExpectations: [Diagnostic.Message]) throws {
    print("*** starting build \(message) ***", to: &stderrStream); stderrStream.flush()
