Skip to content

Commit

Permalink
Avoid using -i argument to go test
Browse files Browse the repository at this point in the history
Since Golang 1.10, this option should no longer be required:

https://golang.org/doc/go1.10#build

> The old advice to add the -i flag for speed, as in go build -i or go
test -i, is no longer necessary: builds run just as fast without -i. For
more details, see go help cache.

Furthermore, it creates issues like the below when running ginkgo
against a snap-installed version of Golang 1.10 on Ubuntu 18.04:

  $ ginkgo build
  Compiling test...
  Failed to compile test:

  go test runtime/cgo: open /snap/go/2130/pkg/linux_amd64/runtime/cgo.a: read-only file system
  • Loading branch information
joestringer committed Jul 17, 2018
1 parent d848015 commit 6babb36
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion ginkgo/testrunner/test_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (t *TestRunner) Compile() error {
}

func (t *TestRunner) BuildArgs(path string) []string {
args := []string{"test", "-c", "-i", "-o", path, t.Suite.Path}
args := []string{"test", "-c", "-o", path, t.Suite.Path}

if t.getCoverMode() != "" {
args = append(args, "-cover", fmt.Sprintf("-covermode=%s", t.getCoverMode()))
Expand Down
1 change: 0 additions & 1 deletion ginkgo/testrunner/test_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ var _ = Describe("TestRunner", func() {
Ω(args).Should(Equal([]string{
"test",
"-c",
"-i",
"-o",
".",
"",
Expand Down

0 comments on commit 6babb36

Please sign in to comment.