mirror of
https://github.com/golang/go
synced 2024-09-30 00:14:36 -06:00
cmd/dist: run limited tests in race and libgcc=none modes
Mostly we just care that the test binaries link and start up. No need to run the full test suites. Takes 12% off my all.bash run time. For #10571. Change-Id: I01af618f3d51deb841ea638424e1389a2df7d746 Reviewed-on: https://go-review.googlesource.com/18086 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
04d732b4c2
commit
f41378e225
10
src/cmd/dist/test.go
vendored
10
src/cmd/dist/test.go
vendored
@ -386,11 +386,15 @@ func (t *tester) registerTests() {
|
||||
}
|
||||
|
||||
pkg := pkg
|
||||
var run string
|
||||
if pkg == "net" {
|
||||
run = "TestTCPStress"
|
||||
}
|
||||
t.tests = append(t.tests, distTest{
|
||||
name: "nolibgcc:" + pkg,
|
||||
heading: "Testing without libgcc.",
|
||||
fn: func() error {
|
||||
return t.dirCmd("src", "go", "test", "-short", "-ldflags=-linkmode=internal -libgcc=none", t.tags(), pkg).Run()
|
||||
return t.dirCmd("src", "go", "test", "-short", "-ldflags=-linkmode=internal -libgcc=none", t.tags(), pkg, "-run="+run).Run()
|
||||
},
|
||||
})
|
||||
}
|
||||
@ -869,7 +873,7 @@ func (t *tester) raceTest() error {
|
||||
if err := t.dirCmd("src", "go", "test", "-race", "-run=Output", "runtime/race").Run(); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := t.dirCmd("src", "go", "test", "-race", "-short", "flag", "os/exec").Run(); err != nil {
|
||||
if err := t.dirCmd("src", "go", "test", "-race", "-short", "-run=TestParse|TestEcho", "flag", "os/exec").Run(); err != nil {
|
||||
return err
|
||||
}
|
||||
if t.cgoEnabled {
|
||||
@ -882,7 +886,7 @@ func (t *tester) raceTest() error {
|
||||
}
|
||||
if t.extLink() {
|
||||
// Test with external linking; see issue 9133.
|
||||
if err := t.dirCmd("src", "go", "test", "-race", "-short", "-ldflags=-linkmode=external", "flag", "os/exec").Run(); err != nil {
|
||||
if err := t.dirCmd("src", "go", "test", "-race", "-short", "-ldflags=-linkmode=external", "-run=TestParse|TestEcho", "flag", "os/exec").Run(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user