File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 6
6
"io"
7
7
"os"
8
8
"os/exec"
9
+ "path/filepath"
9
10
"regexp"
10
11
"strings"
11
12
"syscall"
@@ -63,6 +64,12 @@ func checkForNoTestsWarning(buf *bytes.Buffer) bool {
63
64
}
64
65
65
66
func runGoTest (suite TestSuite , cliConfig types.CLIConfig , goFlagsConfig types.GoFlagsConfig ) TestSuite {
67
+ // As we run the go test from the suite directory, make sure the cover profile is absolute
68
+ // and placed into the expected output directory when one is configured.
69
+ if goFlagsConfig .Cover && ! filepath .IsAbs (goFlagsConfig .CoverProfile ) {
70
+ goFlagsConfig .CoverProfile = AbsPathForGeneratedAsset (goFlagsConfig .CoverProfile , suite , cliConfig , 0 )
71
+ }
72
+
66
73
args , err := types .GenerateGoTestRunArgs (goFlagsConfig )
67
74
command .AbortIfError ("Failed to generate test run arguments" , err )
68
75
cmd , buf := buildAndStartCommand (suite , args , true )
You can’t perform that action at this time.
0 commit comments