mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-16 09:50:45 +00:00
Makefile, build: make test fast fail (#1739)
This commit is contained in:
parent
60868c9045
commit
0fc4c82350
2 changed files with 6 additions and 2 deletions
4
Makefile
4
Makefile
|
|
@ -43,11 +43,11 @@ all:
|
||||||
|
|
||||||
#? test: Run the tests.
|
#? test: Run the tests.
|
||||||
test: all
|
test: all
|
||||||
go run build/ci.go test
|
go run build/ci.go test -failfast
|
||||||
|
|
||||||
#? quick-test: Run the tests except time-consuming tests.
|
#? quick-test: Run the tests except time-consuming tests.
|
||||||
quick-test: all
|
quick-test: all
|
||||||
go run build/ci.go test --quick
|
go run build/ci.go test --quick -failfast
|
||||||
|
|
||||||
#? lint: Run certain pre-selected linters.
|
#? lint: Run certain pre-selected linters.
|
||||||
lint: ## Run linters.
|
lint: ## Run linters.
|
||||||
|
|
|
||||||
|
|
@ -223,6 +223,7 @@ func doTest(cmdline []string) {
|
||||||
coverage := flag.Bool("coverage", false, "Whether to record code coverage")
|
coverage := flag.Bool("coverage", false, "Whether to record code coverage")
|
||||||
verbose := flag.Bool("v", false, "Whether to log verbosely")
|
verbose := flag.Bool("v", false, "Whether to log verbosely")
|
||||||
quick := flag.Bool("quick", false, "Whether to skip long time test")
|
quick := flag.Bool("quick", false, "Whether to skip long time test")
|
||||||
|
failfast := flag.Bool("failfast", false, "Do not start new tests after the first test failure")
|
||||||
flag.CommandLine.Parse(cmdline)
|
flag.CommandLine.Parse(cmdline)
|
||||||
env := build.Env()
|
env := build.Env()
|
||||||
|
|
||||||
|
|
@ -249,6 +250,9 @@ func doTest(cmdline []string) {
|
||||||
if *verbose {
|
if *verbose {
|
||||||
gotest.Args = append(gotest.Args, "-v")
|
gotest.Args = append(gotest.Args, "-v")
|
||||||
}
|
}
|
||||||
|
if *failfast {
|
||||||
|
gotest.Args = append(gotest.Args, "-failfast")
|
||||||
|
}
|
||||||
|
|
||||||
gotest.Args = append(gotest.Args, packages...)
|
gotest.Args = append(gotest.Args, packages...)
|
||||||
build.MustRun(gotest)
|
build.MustRun(gotest)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue