test(build,Makefile): switch quick-test from --quick to -short (#2130)

Replace the quick-test target to run `go run build/ci.go test -short -failfast`.

Remove the `--quick` flag and package-filter path from `build/ci.go`, so test selection relies on Go's built-in short mode instead of custom package exclusion.

This keeps quick-test behavior aligned with tests guarded by `testing.Short()` and avoids maintaining bespoke skip logic in CI tooling.
This commit is contained in:
Daniel Liu 2026-03-10 21:17:49 +08:00 committed by GitHub
parent bad1116a28
commit d1860fa38e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 26 deletions

View file

@ -43,9 +43,9 @@ all:
test: all
go run build/ci.go test -failfast
#? quick-test: Run the tests except time-consuming packages.
#? quick-test: Run tests in short mode (testing.Short()), fail fast.
quick-test: all
go run build/ci.go test --quick -failfast
go run build/ci.go test -short -failfast
#? lint: Run certain pre-selected linters.
lint: ## Run linters.

View file

@ -212,7 +212,6 @@ func doTest(cmdline []string) {
race = flag.Bool("race", false, "Execute the race detector")
short = flag.Bool("short", false, "Pass the 'short'-flag to go test")
threads = flag.Int("p", 1, "Number of CPU threads to use for testing")
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)
@ -255,21 +254,13 @@ func doTest(cmdline []string) {
packages := flag.CommandLine.Args()
if len(packages) > 0 {
if *quick {
packages = filterPackages(packages)
}
gotest.Args = append(gotest.Args, packages...)
build.MustRun(gotest)
return
}
// No packages specified, run all tests for all modules.
if *quick {
packages = filterPackages(build.FindAllPackages(&tc))
} else {
packages = []string{"./..."}
}
gotest.Args = append(gotest.Args, packages...)
gotest.Args = append(gotest.Args, "./...")
for _, mod := range goModules {
test := *gotest
test.Dir = mod
@ -277,20 +268,6 @@ func doTest(cmdline []string) {
}
}
// filterPackages removes time-consuming packages.
func filterPackages(packages []string) []string {
var filtered []string
for _, pkg := range packages {
if strings.Contains(pkg, "/consensus/tests/engine_v2_tests") {
continue
}
filtered = append(filtered, pkg)
}
return filtered
}
// doTidy runs go mod tidy check.
func doTidy() {
var tc = new(build.GoToolchain)