(rawLine: string)
| 306 | } |
| 307 | |
| 308 | function processLine(rawLine: string): void { |
| 309 | const line = normalizeEventLine(rawLine); |
| 310 | if (!line) { |
| 311 | flushPendingError(); |
| 312 | return; |
| 313 | } |
| 314 | |
| 315 | const stContinuation = parseSwiftTestingContinuationLine(line); |
| 316 | if (stContinuation) { |
| 317 | const lastQueuedEntry = Array.from(pendingFailureDiagnostics.values()).at(-1)?.at(-1); |
| 318 | if (lastQueuedEntry) { |
| 319 | lastQueuedEntry.message += `\n${stContinuation}`; |
| 320 | return; |
| 321 | } |
| 322 | } |
| 323 | |
| 324 | if (pendingError && /^\s/u.test(rawLine)) { |
| 325 | pendingError.message += `\n${line}`; |
| 326 | pendingError.rawLines.push(rawLine); |
| 327 | return; |
| 328 | } |
| 329 | |
| 330 | flushPendingError(); |
| 331 | |
| 332 | const xcresultPath = parseXcresultPathLine(line); |
| 333 | if (xcresultPath) { |
| 334 | detectedXcresultPath = xcresultPath; |
| 335 | return; |
| 336 | } |
| 337 | |
| 338 | const testCase = parseTestCaseLine(line); |
| 339 | if (testCase) { |
| 340 | const source = |
| 341 | /^Test case /u.test(line) && /\/.+\(\)$/u.test(testCase.rawName) |
| 342 | ? 'swift-testing' |
| 343 | : 'xcodebuild'; |
| 344 | recordTestCaseResult(testCase, source); |
| 345 | return; |
| 346 | } |
| 347 | |
| 348 | const totals = parseTotalsLine(line); |
| 349 | if (totals) { |
| 350 | completedCount = Math.max(completedCount, totals.executed); |
| 351 | failedCount = Math.max(failedCount, totals.failed); |
| 352 | emitTestProgress(); |
| 353 | return; |
| 354 | } |
| 355 | |
| 356 | const failureDiag = parseFailureDiagnostic(line); |
| 357 | if (failureDiag) { |
| 358 | queueFailureDiagnostic(failureDiag); |
| 359 | return; |
| 360 | } |
| 361 | |
| 362 | const stIssue = parseSwiftTestingIssueLine(line); |
| 363 | if (stIssue) { |
| 364 | queueFailureDiagnostic(stIssue); |
| 365 | return; |
no test coverage detected