github.com/thediveo/gons@v0.9.9/reexec/testing/doc.go (about) 1 /* 2 Package testing supports code coverage profiling of applications using the 3 gons/reexec package. 4 5 This is ugly stuff, because it has Golang's testing package to work in the 6 context of test process re-execution. As testing only writes coverage profile 7 data at the end of testing.M.Run(), we need to run testing.M.Run() also on 8 re-execution. However, without further measures the resulting coverage profile 9 data file of the re-executed child would be overwritten by the parent when it 10 finishes its own testing.M.Run(). So we need to run each re-executed child on 11 its own coverage profile data file. After testing.M.Run() has finished, we 12 then merge the child coverage profile data into the parent's coverage profile 13 data file. 14 */ 15 package testing