Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define a new compile func for go 1.16 #614

Merged
merged 1 commit into from
Apr 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Define a new compile func for go 1.16
`go test -i` is deprecated in go 1.16, and it makes the output parsing
fail, leading to to no coverage reported.

closes #613
  • Loading branch information
gravis committed Mar 9, 2021
commit ec8bade12caa7a1240376fd670bb3f826b7e7a3f
4 changes: 0 additions & 4 deletions web/server/system/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ func findGoConvey(directory, gobin, packageName, tagsArg string) Command {
return NewCommand(directory, gobin, "list", "-f", "'{{.TestImports}}{{.XTestImports}}'", tagsArg, packageName)
}

func compile(directory, gobin, tagsArg string) Command {
return NewCommand(directory, gobin, "test", "-i", tagsArg)
}

func runWithCoverage(compile, goconvey Command, coverage bool, reportPath, directory, gobin, defaultTimeout, tagsArg string, customArguments []string) Command {
if compile.Error != nil || goconvey.Error != nil {
return compile
Expand Down
7 changes: 7 additions & 0 deletions web/server/system/shell_1_16.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// +build go1.16

package system

func compile(directory, gobin, tagsArg string) Command {
return NewCommand(directory, gobin, "test", tagsArg)
}
7 changes: 7 additions & 0 deletions web/server/system/shell_older_than_1_16.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// +build !go1.16

package system

func compile(directory, gobin, tagsArg string) Command {
return NewCommand(directory, gobin, "test", "-i", tagsArg)
}