summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Magefile.go20
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 {