Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.

Commit b278848

Browse files
author
Jeff Verkoeyen
committed
Fix a bug causing coverage files to be lost.
We had a classic parsing bug in the coverage line parser. We scan the coverage output line by line, accumulating coverage information until we hit a filename specifier. Once we hit a filename specifier we commit the accumulated coverage information to the coverage map. Unfortunately we forgot to commit the last file in the coverage output because there is no final filename specifier to cause it to commit. We now commit the hanging file.
1 parent 16c9618 commit b278848

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

parser/XcodeTestResultParser.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ private function parseCoverageResults() {
146146
}
147147
$file []= $line;
148148
}
149+
if ($file && $filename) {
150+
// Commit the hanging file.
151+
$filemap[$filename] = $file;
152+
}
149153

150154
$arccovmap = array();
151155
foreach ($filemap as $filename => $coverage) {

0 commit comments

Comments
 (0)