It was attempting to write a test binary to the working directory.
Updates #28387
Updates #30316
Change-Id: I82eca3a8a3e019dc6dacbe1f02a0583577694b93
Reviewed-on: https://go-review.googlesource.com/c/go/+/207614
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
tg.runFail("test", "notest")
}
-// cmd/go: go test -a foo does not rebuild regexp.
-func TestIssue6844(t *testing.T) {
- if testing.Short() {
- t.Skip("don't rebuild the standard library in short mode")
- }
-
- tg := testgo(t)
- defer tg.cleanup()
- tg.creatingTemp("deps.test" + exeSuffix)
- tg.run("test", "-x", "-a", "-c", "testdata/dep_test.go")
- tg.grepStderr("regexp", "go test -x -a -c testdata/dep-test.go did not rebuild regexp")
-}
-
func TestGoBuildTestOnly(t *testing.T) {
tg := testgo(t)
defer tg.cleanup()
+++ /dev/null
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package deps
-
-import _ "testing"
--- /dev/null
+env GO111MODULE=off
+
+# Regression test for golang.org/issue/6844:
+# 'go test -a' should force dependencies in the standard library to be rebuilt.
+
+[short] skip
+
+go test -x -a -c testdata/dep_test.go
+stderr '^.*[/\\]compile'$GOEXE'["]? (.* )?regexp .*[/\\]regexp\.go'
+
+-- testdata/dep_test.go --
+package deps
+
+import _ "testing"