]> Cypherpunks repositories - gostls13.git/commitdiff
bytes: skip inline test by default
authorMarvin Stenger <marvin.stenger94@gmail.com>
Mon, 8 May 2017 11:18:15 +0000 (13:18 +0200)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 8 May 2017 15:16:21 +0000 (15:16 +0000)
The test "TestTryGrowByResliceInlined" introduced in c08ac36 broke the
noopt builder as it fails when inlining is disabled.
Since there are currently no other options at hand for checking
inlined-ness other than looking at emited symbols of the compilation,
we for now skip the problem causing test by default and only run
it on one specific builder ("linux-amd64").
Also see CL 42813, which introduced the test and contains comments
suggesting this temporary solution.

Change-Id: I3978ab0831da04876cf873d78959f821c459282b
Reviewed-on: https://go-review.googlesource.com/42820
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/bytes/buffer_test.go

index 3c73d7dd8663a51fa87f983c60a9ac6ca05fdbbe..ce2f01a0ad3f9142b33d43b684f4b0b0c6b6e821 100644 (file)
@@ -549,7 +549,12 @@ func TestBufferGrowth(t *testing.T) {
 }
 
 // Test that tryGrowByReslice is inlined.
+// Only execute on "linux-amd64" builder in order to avoid breakage.
 func TestTryGrowByResliceInlined(t *testing.T) {
+       targetBuilder := "linux-amd64"
+       if testenv.Builder() != targetBuilder {
+               t.Skipf("%q gets executed on %q builder only", t.Name(), targetBuilder)
+       }
        t.Parallel()
        goBin := testenv.GoToolPath(t)
        out, err := exec.Command(goBin, "tool", "nm", goBin).CombinedOutput()