]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: run limited tests in race and libgcc=none modes
authorRuss Cox <rsc@golang.org>
Mon, 21 Dec 2015 18:49:12 +0000 (13:49 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 29 Dec 2015 15:48:04 +0000 (15:48 +0000)
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>

src/cmd/dist/test.go

index fc08cf7e694d296ebf2438a5d888bd553c168c56..9ac01616535a0dec7c396af6b5bf902e415fb121 100644 (file)
@@ -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
                }
        }