Skip to content

Commit 51ca2a7

Browse files
committed
release 1.1.1
1 parent 3d6bc73 commit 51ca2a7

File tree

2 files changed

+50
-19
lines changed

2 files changed

+50
-19
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# changelog for gcov2lcov
22

3+
## 1.1.1 [2024-10-23]
4+
5+
* provide a release package `gcov2lcov-linux-amd64.tar.gz` to be compatible
6+
with older `gcov2lcov-action` versions
7+
38
## 1.1.0 [2024-10-11]
49

510
* use goreleaser for builds and provide additional versions

README.md

+45-19
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,31 @@ uses some parts of [goveralls](https://github.com/mattn/goveralls).
1717

1818
## Installation
1919

20-
```
20+
### Binary download
21+
22+
Download a version for your platform from the [Releases](https://github.com/jandelgado/gcov2lcov/releases) page.
23+
24+
You may have noticed that the file `gcov2lcov-linux-amd64.tar.gz` does not
25+
follow the naming convention used for other artifacts. This particular file is
26+
provided for backward compatibility with the `gcov2lcov-action` and can be
27+
disregarded for general use.
28+
29+
### Compile from source
30+
31+
```text
2132
$ go install github.com/jandelgado/gcov2lcov@latest
2233
```
2334

2435
## Usage
2536

26-
```
37+
```text
2738
Usage of ./gcov2lcov:
2839
-infile string
29-
go coverage file to read, default: <stdin>
40+
go coverage file to read, default: <stdin>
3041
-outfile string
31-
lcov file to write, default: <stdout>
42+
lcov file to write, default: <stdout>
3243
-use-absolute-source-path
33-
use absolute paths for source file in lcov output, default: false
44+
use absolute paths for source file in lcov output, default: false
3445
```
3546

3647
### Example
@@ -42,17 +53,18 @@ gcov2lcov -infile=coverage.out -outfile=coverage.lcov
4253

4354
### GOROOT
4455

45-
It might be necessary to set the `GOROOT` environment variable properly before calling `gcov2lcov`.
46-
If you see `cannot find GOROOT directory` warnings like e.g.
56+
It might be necessary to set the `GOROOT` environment variable properly before
57+
calling `gcov2lcov`. If you see `cannot find GOROOT directory` warnings like
58+
e.g.
4759

48-
```
60+
```text
4961
022/05/23 16:00:58 warn: go/build: importGo github.com/pashagolub/pgxmock/: exit status 2
5062
go: cannot find GOROOT directory: /opt/hostedtoolcache/go/1.13.15/x64
5163
```
5264

5365
Then call `gcov2lcov` with
5466

55-
```
67+
```text
5668
$ GOROOT=$(go env GOROOT) gcov2lcov -infile=coverage.out -outfile=coverage.lcov
5769
```
5870

@@ -67,12 +79,15 @@ The following desription is taken from the [geninfo
6779
manpage](http://ltp.sourceforge.net/coverage/lcov/geninfo.1.php) of the [lcov
6880
homepage](http://ltp.sourceforge.net/coverage/lcov/):
6981

70-
```
71-
A tracefile is made up of several human-readable lines of text, divided into sections. If available, a tracefile begins with the testname which is stored in the following format:
82+
```text
83+
A tracefile is made up of several human-readable lines of text, divided into
84+
sections. If available, a tracefile begins with the testname which is stored in
85+
the following format:
7286
7387
TN:<test name>
7488
75-
For each source file referenced in the .da file, there is a section containing filename and coverage data:
89+
For each source file referenced in the .da file, there is a section containing
90+
filename and coverage data:
7691
7792
SF:<absolute path to the source file>
7893
@@ -92,31 +107,42 @@ Branch coverage information is stored which one line per branch:
92107
93108
BRDA:<line number>,<block number>,<branch number>,<taken>
94109
95-
Block number and branch number are gcc internal IDs for the branch. Taken is either '-' if the basic block containing the branch was never executed or a number indicating how often that branch was taken.
110+
Block number and branch number are gcc internal IDs for the branch. Taken is
111+
either '-' if the basic block containing the branch was never executed or a
112+
number indicating how often that branch was taken.
96113
97114
Branch coverage summaries are stored in two lines:
98115
99116
BRF:<number of branches found> BRH:<number of branches hit>
100117
101-
Then there is a list of execution counts for each instrumented line (i.e. a line which resulted in executable code):
118+
Then there is a list of execution counts for each instrumented line (i.e. a
119+
line which resulted in executable code):
102120
103121
DA:<line number>,<execution count>[,<checksum>]
104122
105-
Note that there may be an optional checksum present for each instrumented line. The current geninfo implementation uses an MD5 hash as checksumming algorithm.
123+
Note that there may be an optional checksum present for each instrumented line.
124+
The current geninfo implementation uses an MD5 hash as checksumming algorithm.
106125
107-
At the end of a section, there is a summary about how many lines were found and how many were actually instrumented:
126+
At the end of a section, there is a summary about how many lines were found and
127+
how many were actually instrumented:
108128
109129
LH:<number of lines with a non-zero execution count> LF:<number of instrumented lines>
110130
111131
Each sections ends with:
112132
113133
end_of_record
114134
115-
In addition to the main source code file there are sections for all #included files which also contain executable code.
135+
In addition to the main source code file there are sections for all #included
136+
files which also contain executable code.
116137
117-
Note that the absolute path of a source file is generated by interpreting the contents of the respective .bb file (see gcov (1) for more information on this file type). Relative filenames are prefixed with the directory in which the .bb file is found.
138+
Note that the absolute path of a source file is generated by interpreting the
139+
contents of the respective .bb file (see gcov (1) for more information on this
140+
file type). Relative filenames are prefixed with the directory in which the .bb
141+
file is found.
118142
119-
Note also that symbolic links to the .bb file will be resolved so that the actual file path is used instead of the path to a link. This approach is necessary for the mechanism to work with the /proc/gcov files.
143+
Note also that symbolic links to the .bb file will be resolved so that the
144+
actual file path is used instead of the path to a link. This approach is
145+
necessary for the mechanism to work with the /proc/gcov files.
120146
121147
```
122148

0 commit comments

Comments
 (0)