mirror of
https://github.com/golang/go
synced 2024-11-23 15:10:12 -07:00
cmd/go: remove tests using testdata/flag_test.go
Part of converting all tests to script framework to improve test parallelism. Updates #36320 Updates #17751 Change-Id: I6573185cf14f298c51f76265f18a75e4960ce791 Reviewed-on: https://go-review.googlesource.com/c/go/+/213220 Run-TryBot: Michael Matloob <matloob@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
This commit is contained in:
parent
bc91947527
commit
cde230b8b3
@ -2602,14 +2602,6 @@ func TestGoTestMainTwice(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGoTestFlagsAfterPackage(t *testing.T) {
|
|
||||||
tooSlow(t)
|
|
||||||
tg := testgo(t)
|
|
||||||
defer tg.cleanup()
|
|
||||||
tg.run("test", "testdata/flag_test.go", "-v", "-args", "-v=7") // Two distinct -v flags.
|
|
||||||
tg.run("test", "-v", "testdata/flag_test.go", "-args", "-v=7") // Two distinct -v flags.
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestGoTestXtestonlyWorks(t *testing.T) {
|
func TestGoTestXtestonlyWorks(t *testing.T) {
|
||||||
tg := testgo(t)
|
tg := testgo(t)
|
||||||
defer tg.cleanup()
|
defer tg.cleanup()
|
||||||
@ -4767,14 +4759,6 @@ func TestInstallDeps(t *testing.T) {
|
|||||||
tg.mustExist(p1)
|
tg.mustExist(p1)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGoTestMinusN(t *testing.T) {
|
|
||||||
// Intent here is to verify that 'go test -n' works without crashing.
|
|
||||||
// This reuses flag_test.go, but really any test would do.
|
|
||||||
tg := testgo(t)
|
|
||||||
defer tg.cleanup()
|
|
||||||
tg.run("test", "testdata/flag_test.go", "-n", "-args", "-v=7")
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestGoTestJSON(t *testing.T) {
|
func TestGoTestJSON(t *testing.T) {
|
||||||
skipIfGccgo(t, "gccgo does not have standard packages")
|
skipIfGccgo(t, "gccgo does not have standard packages")
|
||||||
tooSlow(t)
|
tooSlow(t)
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
[short] skip
|
||||||
|
|
||||||
|
go test flag_test.go -v -args -v=7 # Two distinct -v flags
|
||||||
|
go test -v flag_test.go -args -v=7 # Two distinct -v flags
|
||||||
|
|
||||||
|
-- flag_test.go --
|
||||||
package flag_test
|
package flag_test
|
||||||
|
|
||||||
import (
|
import (
|
14
src/cmd/go/testdata/script/test_minus_n.txt
vendored
Normal file
14
src/cmd/go/testdata/script/test_minus_n.txt
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# The intent here is to verify that 'go test -n' works without crashing.
|
||||||
|
# Any test will do.
|
||||||
|
|
||||||
|
go test -n x_test.go
|
||||||
|
|
||||||
|
-- x_test.go --
|
||||||
|
package x_test
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestEmpty(t *testing.T) {
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user