Skip to content

Commit

Permalink
cmd/compile: mark a few more tests as parallel
Browse files Browse the repository at this point in the history
Reduces the time on my machine for

go clean -cache; go test -short -count=1 cmd/compile/internal/gc

from 4.7s to 3.7s.

Updates #26473

Change-Id: I9f9573675ffd6519da63961f48f61260ae4717fd
Reviewed-on: https://go-review.googlesource.com/c/go/+/176937
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  • Loading branch information
josharian committed May 13, 2019
1 parent f68244e commit 5d98330
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/cmd/compile/internal/gc/builtin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (

func TestBuiltin(t *testing.T) {
testenv.MustHaveGoRun(t)
t.Parallel()

old, err := ioutil.ReadFile("builtin.go")
if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions src/cmd/compile/internal/gc/global_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
// fmt.scanf routines. See issue 6853.
func TestScanfRemoval(t *testing.T) {
testenv.MustHaveGoBuild(t)
t.Parallel()

// Make a directory to work in.
dir, err := ioutil.TempDir("", "issue6853a-")
Expand Down Expand Up @@ -66,6 +67,7 @@ func main() {
// Make sure -S prints assembly code. See issue 14515.
func TestDashS(t *testing.T) {
testenv.MustHaveGoBuild(t)
t.Parallel()

// Make a directory to work in.
dir, err := ioutil.TempDir("", "issue14515-")
Expand Down
2 changes: 2 additions & 0 deletions src/cmd/compile/internal/gc/scope_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ const detailOutput = false
// corresponds to what we expect it to be.
func TestScopeRanges(t *testing.T) {
testenv.MustHaveGoBuild(t)
t.Parallel()

if runtime.GOOS == "plan9" {
t.Skip("skipping on plan9; no DWARF symbol table in executables")
Expand Down Expand Up @@ -445,6 +446,7 @@ func gobuild(t *testing.T, dir string, optimized bool, testfile []testline) (str
// See issue #23928.
func TestEmptyDwarfRanges(t *testing.T) {
testenv.MustHaveGoRun(t)
t.Parallel()

if runtime.GOOS == "plan9" {
t.Skip("skipping on plan9; no DWARF symbol table in executables")
Expand Down

0 comments on commit 5d98330

Please sign in to comment.