aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-03-17 17:11:23 +0100
committerDmitry Vyukov <dvyukov@google.com>2020-03-17 21:19:13 +0100
commitfc752a617fa05e6e2507388a1adcb9238eb5ec31 (patch)
treea9fe932815d7c482321219cddd5b6fd43638ffa3 /pkg
parent2e9037c55f6a3308190ab4eb0ce110dddc7a6f2b (diff)
pkg/compiler: reduce clutter in test output
Don't prefix each error with test file:line (which is pointless in this case).
Diffstat (limited to 'pkg')
-rw-r--r--pkg/compiler/compiler_test.go6
1 files changed, 5 insertions, 1 deletions
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")