diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-22 22:34:55 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-22 22:34:55 +0200 |
| commit | 113c5766d22ad48beb2a50ab617298ed98d7031e (patch) | |
| tree | 5f2cb54924f0dabbed7019ab40fda3de6d3a4515 | |
| parent | a65bab70a6c842c0217f039e74f2cbc577ac857c (diff) | |
Filter noisy tracepoint attach lines from integration LOG output
| -rw-r--r-- | Magefile.go | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/Magefile.go b/Magefile.go index 8ab5c59..7e88141 100644 --- a/Magefile.go +++ b/Magefile.go @@ -647,7 +647,7 @@ func runGoTestWithProgress(env map[string]string, args ...string) error { fmt.Println("SKIP", key) case "output": msg := strings.TrimSpace(ev.Output) - if msg != "" { + if msg != "" && shouldPrintTestLog(msg) { fmt.Println("LOG ", key, "-", msg) } } @@ -671,6 +671,24 @@ func envToList(env map[string]string) []string { return out } +func shouldPrintTestLog(msg string) bool { + // Drop high-volume attach/debug noise from ior startup in integration tests. + noisePrefixes := []string{ + "ShouldIAttachTracepoint called with ", + "Attaching tracepoint ", + "Attached prog handle_ ", + "Attached tracepoint", + "Attaching sys_", + "Not attaching sys_", + } + for _, p := range noisePrefixes { + if strings.HasPrefix(msg, p) { + return false + } + } + return true +} + func isIntegrationTest(testName string) (bool, error) { out, err := sh.OutputWith(goEnv(), "go", "test", "./integrationtests/...", "-list", ".") if err != nil { |
