Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions actions/parse-ci-reports/src/parsers/LCOVParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ export class LCOVParser extends BaseParser {

return (
hasSupportedName &&
content.includes("TN:") &&
(content.includes("SF:") || content.includes("DA:"))
content.includes("SF:") &&
(content.includes("DA:") ||
content.includes("LF:") ||
content.includes("end_of_record"))
);
}

Expand Down
14 changes: 14 additions & 0 deletions actions/parse-ci-reports/src/parsers/LCOVParser.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ BRDA:2,0,1,0
end_of_record
`;

const SAMPLE_LCOV_WITHOUT_TEST_NAME = `SF:lib/main.dart
DA:1,1
DA:2,0
LF:2
LH:1
end_of_record
`;

describe("LCOVParser", () => {
it("keeps auto-pattern path detection synchronized", () => {
const parser = new LCOVParser();
Expand All @@ -25,6 +33,12 @@ describe("LCOVParser", () => {
const parser = new LCOVParser();

assert.ok(parser.canParse("coverage/lcov.info", SAMPLE_LCOV));
assert.ok(
parser.canParse(
"flutter/coverage/lcov.info",
SAMPLE_LCOV_WITHOUT_TEST_NAME,
),
);
assert.ok(!parser.canParse("coverage/report.txt", SAMPLE_LCOV));
});

Expand Down
Loading