]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile/internal/ssa: print output on failure in TestFmaHash
authorCherry Mui <cherryyz@google.com>
Tue, 14 May 2024 16:49:39 +0000 (12:49 -0400)
committerCherry Mui <cherryyz@google.com>
Tue, 14 May 2024 21:57:53 +0000 (21:57 +0000)
When the test fails to run the command, print the error message
to help debug.

Change-Id: I443579a622ba1bf67ef27071f141e945303d4c2b
Reviewed-on: https://go-review.googlesource.com/c/go/+/585357
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/cmd/compile/internal/ssa/fmahash_test.go

index dfa1aa1147ebf63d4419a5e594c2fbfa4e1b443b..c563d5b8d9d01be650306cfc7cc8af559c782835 100644 (file)
@@ -41,7 +41,7 @@ func TestFmaHash(t *testing.T) {
        t.Logf("%v", cmd.Env)
        b, e := cmd.CombinedOutput()
        if e != nil {
-               t.Error(e)
+               t.Errorf("build failed: %v\n%s", e, b)
        }
        s := string(b) // Looking for "GOFMAHASH triggered main.main:24"
        re := "fmahash(0?) triggered .*fma.go:29:..;.*fma.go:18:.."