aboutsummaryrefslogtreecommitdiff
path: root/test/html/leakfilter.awk
blob: 8464092027f512c7708ff44e549a67c67ee9e881 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Detect beginning of leak message
/^(Direct|Indirect) leak/       { msg=msg "\n" $0; inleak=1; next }

# Ignore anything coming from libfontconfig.so
inleak && /libfontconfig.so/    { inleak=0; msg="" }

# Store leak line
inleak && /^ +#/                { msg=msg "\n" $0; next }

# End of the leak lines, print and finish
inleak                          { inleak=0; print msg; msg=""; nleaks++ }

# At exit count filtered leaks and fail accordingly
END { printf "\n==== Total leaks after filter: %d ====\n\n", nleaks; if (nleaks > 0) { exit 1 } }