Skip to content

Commit c3c6069

Browse files
authored
mention GOROOT
1 parent f7e3213 commit c3c6069

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,22 @@ $ go test -coverprofile=coverage.out && \
4040
gcov2lcov -infile=coverage.out -outfile=coverage.lcov
4141
```
4242

43+
### GOROOT
44+
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.
47+
48+
```
49+
022/05/23 16:00:58 warn: go/build: importGo github.com/pashagolub/pgxmock/: exit status 2
50+
go: cannot find GOROOT directory: /opt/hostedtoolcache/go/1.13.15/x64
51+
```
52+
53+
Then call `gcov2lcov` with
54+
55+
```
56+
$ GOROOT=$(go env GOROOT) gcov2lcov -infile=coverage.out -outfile=coverage.lcov
57+
```
58+
4359
## Build and Test
4460

4561
* `make test` to run tests

0 commit comments

Comments
 (0)