Coder Social home page Coder Social logo

gocovmerge's People

Contributors

wadey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gocovmerge's Issues

when does OVERLAP MERGE happen?

I am trying to understand the case that I am getting this error from. Could you explain when that is?

Since its valid to take profiles from different runs "overlap" sounds like a normal case.

different mode merging?

Why can't different modes be merged? I don't see any logic in the code to take any differences into account. When I look at the format in the files between count/atomic, it looks the same.

Issue: failed to parse profiles: line...doesn't match expected format: couldn't find a before

Go version (go version)?

$ go version
go version go1.13.9 darwin/amd64

Details about the operating system and processor architecture (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="$HOME/Library/Caches/go-build"
GOENV="$HOME/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="$HOME/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="$HOME/go/project1/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/nt/gc7658bs1132ttlcjdmlwwxm0000gn/T/go-build221587211=/tmp/go-build -gno-record-gcc-switches -fno-common"

Problem statement

I am generating respective coverage files for each _test.go file. However, I am getting an error while executing the gocovmerge command from last few days. I first encountered it on 25 March, then on 26-27 March, it worked fine. But again from 28-29 March, I am facing the same issue again.

Executed below command to generate merged coverage profile file

gocovmerge ${coverageDir}/myTest-*-coverage.profile

Expected outcome?

Merged coverage profile file being generated without any error

Observed output?

2021/03/30 01:43:34 failed to parse profiles: line "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" doesn't match expected format: couldn't find a   before Count

Kindly assist in nailing down the issue.

merging cover profiles with the same files doesn't add to coverage

When running coverage doing an integration tests (e.g. generating coverage for other packages in my project that get covered when a test runs).

Using go test -coverpkg=pkgA,pkgB,pkgC -coverprofile=profile.cover ./subpackage

I think it's because the same go files are represented in the merged cover profile and the last entry counts, it should be calculating the total aggregate coverage if it processes files of the same name.

Light gray lines in -html output

I really wanted this to work, but when I run go tool cover -html, I see
not just dark gray, green and red lines, but also light gray lines of
code. It is not obvious whether those lines are covered or not.
profilehtml

I generated the coverage output by doing:

   cd $GOPATH/github.com/juju/juju/api
   go test -coverprofile /tmp/c.out
   cd ../apiserver/client
   go test -coverkg github.com/juju/juju/api -coverprofile d.out
   gocovmerge /tmp/c.out /tmp/d.out > /tmp/e.out
   go tool cover -html /tmp/e.out

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.