diff options
author | Austin Clements <austin@google.com> | 2017-10-11 10:34:35 -0400 |
---|---|---|
committer | David Chase <drchase@google.com> | 2017-10-11 17:53:10 +0000 |
commit | 0bede7f34e20a77052b433a3c8ee402aa731183e (patch) | |
tree | 6c9936b53377139bf7b7ceaed4e6aea7fecf8ffd /src/cmd/compile/internal/ssa/debug_test.go | |
parent | 0aef82aa4a301a7914e6a38d6e3d4722a6e1c547 (diff) | |
download | go-0bede7f34e20a77052b433a3c8ee402aa731183e.tar.gz go-0bede7f34e20a77052b433a3c8ee402aa731183e.zip |
cmd/compile: split TestNexting into subtests
This makes it more obvious which of the two builds is failing by
putting "dbg" or "opt" directly in the test name. It also makes it
possible for them to fail independently, so a failure in "dbg" doesn't
mask a failure in "opt", and to visibly skip the opt test when run
with an unoptimized runtime.
Change-Id: I3403a7fd3c1a13ad51a938bb95dfe54c320bb58e
Reviewed-on: https://go-review.googlesource.com/69970
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/debug_test.go')
-rw-r--r-- | src/cmd/compile/internal/ssa/debug_test.go | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/cmd/compile/internal/ssa/debug_test.go b/src/cmd/compile/internal/ssa/debug_test.go index 238745466f..975c1291a7 100644 --- a/src/cmd/compile/internal/ssa/debug_test.go +++ b/src/cmd/compile/internal/ssa/debug_test.go @@ -98,12 +98,18 @@ func TestNexting(t *testing.T) { } } - testNexting(t, "hist", "dbg", "-N -l") - // If this is test is run with a runtime compiled with -N -l, it is very likely to fail. - // This occurs in the noopt builders (for example). - if gogcflags := os.Getenv("GO_GCFLAGS"); *force || !strings.Contains(gogcflags, "-N") && !strings.Contains(gogcflags, "-l") { - testNexting(t, "hist", "opt", "") - } + t.Run("dbg", func(t *testing.T) { + testNexting(t, "hist", "dbg", "-N -l") + }) + t.Run("opt", func(t *testing.T) { + // If this is test is run with a runtime compiled with -N -l, it is very likely to fail. + // This occurs in the noopt builders (for example). + if gogcflags := os.Getenv("GO_GCFLAGS"); *force || (!strings.Contains(gogcflags, "-N") && !strings.Contains(gogcflags, "-l")) { + testNexting(t, "hist", "opt", "") + } else { + t.Skip("skipping for unoptimized runtime") + } + }) } func testNexting(t *testing.T, base, tag, gcflags string) { |