From 2fe8a6256c818840cc9a10cf3f366d8410437245 Mon Sep 17 00:00:00 2001 From: Ricky Stewart Date: Fri, 2 Apr 2021 14:43:02 -0500 Subject: [PATCH] Be verbose about the error code returned from failing tests --- go/tools/builders/generate_test_main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/go/tools/builders/generate_test_main.go b/go/tools/builders/generate_test_main.go index 656a052f79..34dc39a55e 100644 --- a/go/tools/builders/generate_test_main.go +++ b/go/tools/builders/generate_test_main.go @@ -129,6 +129,7 @@ func main() { if bzltestutil.ShouldWrap() { err := bzltestutil.Wrap("{{.Pkgname}}") if xerr, ok := err.(*exec.ExitError); ok { + log.Printf("Test %v exited with error code %v", os.Getenv("TEST_TARGET"), xerr.ExitCode()) os.Exit(xerr.ExitCode()) } else if err != nil { log.Print(err)