Skip to content
Merge coverprofile results from multiple go cover runs
Branch: master
Clone or download

Latest commit

wadey merge Count based on the covermode
The cover modes are described as:
From [The Go Blog: The cover story](

         The go test command accepts a -covermode flag to set the coverage
         mode to one of three settings:

         - set: did each statement run?
         - count: how many times did each statement run?
         - atomic: like count, but counts precisely in parallel programs

Previously, we were always merging like it was "set" mode. This change
instead handles the Count correctly for each `-covermode` type.
Latest commit b5bfa59 Mar 31, 2016


Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE BSD License Jul 23, 2015 add Jul 23, 2015
gocovmerge.go merge Count based on the covermode Mar 31, 2016


gocovmerge takes the results from multiple go test -coverprofile runs and merges them into one profile.


gocovmerge [coverprofiles...]

gocovmerge takes the source coverprofiles as the arguments (output from go test -coverprofile coverage.out) and outputs a merged version of the files to standard out. You can only merge profiles that were generated from the same source code. If there are source lines that overlap or do not merge, the process will exit with an error code.

You can’t perform that action at this time.