Log a message when test framework fails to parse cover profile flag
Signed-off-by: Jake Sanders <i@am.so-aweso.me>
This commit is contained in:
parent
eab7c954a2
commit
bb519a59b9
@ -59,7 +59,9 @@ func InitCoverage(name string) {
|
||||
}
|
||||
|
||||
// Set up the unit test framework with the required arguments to activate test coverage.
|
||||
if err := flag.CommandLine.Parse([]string{"-test.coverprofile", tempCoveragePath()}); err != nil {
|
||||
cmdLine := []string{"-test.coverprofile", tempCoveragePath()}
|
||||
if err := flag.CommandLine.Parse(cmdLine); err != nil {
|
||||
fmt.Printf("Failed to activate test coverage framework (failed to parse command line): %v\n", cmdLine)
|
||||
panic(err)
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user