ci: enable race tests as cron job on travis (#23480)
This commit is contained in:
parent
cf8a6d6173
commit
da3da7c0e7
12
.travis.yml
12
.travis.yml
@ -263,3 +263,15 @@ jobs:
|
|||||||
submodules: false # avoid cloning ethereum/tests
|
submodules: false # avoid cloning ethereum/tests
|
||||||
script:
|
script:
|
||||||
- go run build/ci.go purge -store gethstore/builds -days 14
|
- go run build/ci.go purge -store gethstore/builds -days 14
|
||||||
|
|
||||||
|
# This builder executes race tests
|
||||||
|
- stage: build
|
||||||
|
if: type = cron
|
||||||
|
os: linux
|
||||||
|
dist: bionic
|
||||||
|
go: 1.17.x
|
||||||
|
env:
|
||||||
|
- GO111MODULE=on
|
||||||
|
script:
|
||||||
|
- go run build/ci.go test -race -coverage $TEST_PACKAGES
|
||||||
|
|
||||||
|
@ -282,6 +282,7 @@ func doTest(cmdline []string) {
|
|||||||
cc = flag.String("cc", "", "Sets C compiler binary")
|
cc = flag.String("cc", "", "Sets C compiler binary")
|
||||||
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")
|
||||||
|
race = flag.Bool("race", false, "Execute the race detector")
|
||||||
)
|
)
|
||||||
flag.CommandLine.Parse(cmdline)
|
flag.CommandLine.Parse(cmdline)
|
||||||
|
|
||||||
@ -302,6 +303,9 @@ func doTest(cmdline []string) {
|
|||||||
if *verbose {
|
if *verbose {
|
||||||
gotest.Args = append(gotest.Args, "-v")
|
gotest.Args = append(gotest.Args, "-v")
|
||||||
}
|
}
|
||||||
|
if *race {
|
||||||
|
gotest.Args = append(gotest.Args, "-race")
|
||||||
|
}
|
||||||
|
|
||||||
packages := []string{"./..."}
|
packages := []string{"./..."}
|
||||||
if len(flag.CommandLine.Args()) > 0 {
|
if len(flag.CommandLine.Args()) > 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user