From fc752a617fa05e6e2507388a1adcb9238eb5ec31 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 17 Mar 2020 17:11:23 +0100 Subject: pkg/compiler: reduce clutter in test output Don't prefix each error with test file:line (which is pointless in this case). --- pkg/compiler/compiler_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'pkg/compiler') diff --git a/pkg/compiler/compiler_test.go b/pkg/compiler/compiler_test.go index 46582d9aa..a58e3be5f 100644 --- a/pkg/compiler/compiler_test.go +++ b/pkg/compiler/compiler_test.go @@ -37,9 +37,13 @@ func TestCompileAll(t *testing.T) { arch, target := arch, target t.Run(arch, func(t *testing.T) { t.Parallel() + errors := new(bytes.Buffer) eh := func(pos ast.Pos, msg string) { - t.Logf("%v: %v", pos, msg) + fmt.Fprintf(errors, "%v: %v\n", pos, msg) } + defer func() { + t.Logf("\n%s", errors.Bytes()) + }() consts := DeserializeConstsGlob(filepath.Join(path, "*_"+arch+".const"), eh) if consts == nil { t.Fatalf("reading consts failed") -- cgit mrf-deployment