Skip to content

Commit 3af5431

Browse files
committed
Remove deprecated 'lcov --diff ...' feature.
At best: the result was misleading. This usecase is better supported via differential reporting.
1 parent 2d9ec85 commit 3af5431

File tree

10 files changed

+10
-860
lines changed

10 files changed

+10
-860
lines changed

bin/lcov

Lines changed: 7 additions & 597 deletions
Large diffs are not rendered by default.

man/lcov.1

Lines changed: 1 addition & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -243,31 +243,6 @@ such that coverpoints found only in the set on the left will be retained and all
243243
.RE
244244

245245

246-
Generate new tracefile from existing tracefile, modifying line numbers as indicated in diff file:
247-
.br
248-
249-
.RS 3
250-
.B lcov
251-
.BR \-\-diff
252-
.IR "tracefile diff"
253-
.RS 4
254-
.br
255-
.RB [ \-o | \-\-output\-file
256-
.IR tracefile ]
257-
.RB [ \-\-checksum ]
258-
.RB [ \-\-no\-checksum ]
259-
.br
260-
.RB [ \-\-convert\-filenames ]
261-
.RB [ \-\-strip
262-
.IR depth ]
263-
.RB [ \-\-path
264-
.IR path ]
265-
.br
266-
.RE
267-
.br
268-
.B NOTE: the \-\-diff option is deprecated and will be removed in a subsequent release - see below.
269-
.RE
270-
271246

272247
Summarize tracefile content:
273248
.br
@@ -427,7 +402,7 @@ filename combinations.
427402
The result of the add operation will be written to stdout or the tracefile
428403
specified with \-o.
429404

430-
Only one of \-z, \-c, \-a, \-e, \-r, \-l, \-\-diff or \-\-summary may be
405+
Only one of \-z, \-c, \-a, \-e, \-r, \-l or \-\-summary may be
431406
specified at a time.
432407

433408
.RE
@@ -688,56 +663,6 @@ appended.
688663

689664
.RE
690665

691-
692-
.B \-\-convert\-filenames
693-
.br
694-
.RS
695-
Convert filenames when applying diff.
696-
697-
Use this option together with \-\-diff to rename the file names of processed
698-
data sets according to the data provided by the diff.
699-
.RE
700-
701-
.B \-\-diff
702-
.I tracefile
703-
.I difffile
704-
.br
705-
.RS
706-
Convert coverage data in
707-
.I tracefile
708-
using source code diff file
709-
.IR difffile .
710-
711-
.B NOTE THAT THIS FEATURE IS DEPRECATED AND WILL BE REMOVED IN A SUBSEQUENT RELEASE.
712-
The converted coverage data may be misleading at best and is incorrect at worst - for example, inserted or modified code may have changed the reachability of unchanged regions.
713-
Please see the
714-
.I "differential coverage"
715-
section in
716-
.B man(1) genhtml
717-
for a more robust conversion and comparison methodology.
718-
719-
Use this option if you want to merge coverage data from different source code
720-
levels of a program, e.g. when you have data taken from an older version
721-
and want to combine it with data from a more current version.
722-
.B lcov
723-
will try to map source code lines between those versions and adjust the coverage
724-
data respectively.
725-
.I difffile
726-
needs to be in unified format, i.e. it has to be created using the "\-u" option
727-
of the
728-
.B diff
729-
tool.
730-
731-
Note that lines which are not present in the old version will not be counted
732-
as instrumented, therefore tracefiles resulting from this operation should
733-
not be interpreted individually but together with other tracefiles taken
734-
from the newer version. Also keep in mind that converted coverage data should
735-
only be used for overview purposes as the process itself introduces a loss
736-
of accuracy.
737-
738-
The result of the diff operation will be written to stdout or the tracefile
739-
specified with \-o.
740-
741666
Only one of \-z, \-c, \-a, \-e, \-r, \-l, \-\-diff or \-\-summary may be
742667
specified at a time.
743668
.RE
@@ -1669,16 +1594,6 @@ By convention, lcov\-generated coverage data files are called "tracefiles" and
16691594
should have the filename extension ".info".
16701595
.RE
16711596

1672-
.B \-\-path
1673-
.I path
1674-
.br
1675-
.RS
1676-
Strip path from filenames when applying diff.
1677-
1678-
Use this option together with \-\-diff to tell lcov to disregard the specified
1679-
initial path component when matching between tracefile and diff filenames.
1680-
.RE
1681-
16821597
.B \-v
16831598
.br
16841599
.B \-\-verbose
@@ -1783,16 +1698,6 @@ Only one of \-z, \-c, \-a, \-e, \-r, \-l, \-\-diff or \-\-summary may be
17831698
specified at a time.
17841699
.RE
17851700

1786-
.B \-\-strip
1787-
.I depth
1788-
.br
1789-
.RS
1790-
Strip path components when applying diff.
1791-
1792-
Use this option together with \-\-diff to tell lcov to disregard the specified
1793-
number of initial directories when matching tracefile and diff filenames.
1794-
.RE
1795-
17961701
.B \-\-summary
17971702
.I tracefile
17981703
.br

scripts/P4version.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ sub new
131131
my $depot_path = $1;
132132
my $version = $2 ? "#$2" : '@head';
133133
my $filename = $3;
134+
next unless -e $filename; # filename has ben deleted
134135
my $full = Cwd::abs_path($filename);
135136
die("unexpected depot filename $filename")
136137
unless $root eq substr($filename, 0, $len);

tests/lcov/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
include ../common.mak
22

3-
TESTS := add/ diff/ misc/ summary/ extract/ demangle/ exception/ gcov-tool/ branch/ merge/ format errs multiple follow initializer lambda
3+
TESTS := add/ misc/ summary/ extract/ demangle/ exception/ gcov-tool/ branch/ merge/ format errs multiple follow initializer lambda

tests/lcov/diff/Makefile

Lines changed: 0 additions & 8 deletions
This file was deleted.

tests/lcov/diff/new/Makefile

Lines changed: 0 additions & 17 deletions
This file was deleted.

tests/lcov/diff/new/prog.c

Lines changed: 0 additions & 41 deletions
This file was deleted.

tests/lcov/diff/old/Makefile

Lines changed: 0 additions & 17 deletions
This file was deleted.

tests/lcov/diff/old/prog.c

Lines changed: 0 additions & 22 deletions
This file was deleted.

tests/lcov/diff/test.sh

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)