Repository navigation
Commit 195d2ae
committed
test_runner: merge call counts of functions without block coverage
When merging the coverage reports of several processes, an entry
without block coverage was treated as carrying no data, and was replaced
outright by an entry with block coverage. That holds for a function that
was never compiled, which V8 reports with a count of 0. It does not hold
for a function that V8 could not instrument, such as one deserialized
from a code cache or compiled before coverage started: V8 reports those
with their real call count. Depending on the order in which the reports
were read, a function that ran could be reported as never run.
Add up the call counts whenever either entry lacks block coverage, and
keep the block level ranges if one of them has them.
Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com>1 parent 502c117 commit 195d2ae
4 files changed
Lines changed: 55 additions & 10 deletions
File tree
- lib/internal/test_runner
- test
- fixtures/test-runner/coverage-function-counts
- parallel
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
765 | | - | |
766 | | - | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
767 | 764 | | |
768 | 765 | | |
769 | 766 | | |
| 767 | + | |
770 | 768 | | |
771 | 769 | | |
772 | 770 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
657 | 657 | | |
658 | 658 | | |
659 | 659 | | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
0 commit comments