miller/c/tools/clean-valgrind-output
2016-02-14 09:54:19 -05:00

33 lines
996 B
Bash
Executable file

#!/bin/bash
# E.g. for filtering the output of reg_test/run --valgrind.
# This just strips out some false positives, e.g. system-level stuff not
# relevant to Miller itself. mgrepv is at
# https://github.com/johnkerl/scripts/blob/master/fundam/mgrepv
sed 's/^==.*== //' "$@" | swipe \
| mgrepv dyld \
| mgrepv copySwiftV1MangledName \
| mgrepv 'LEAK SUMMARY' \
| mgrepv 'HEAP SUMMARY' \
| grep -v 'UNKNOWN fcntl' \
| grep -v 'UNKNOWN host message' \
| grep -v 'UNKNOWN task message' \
| grep -v 'ERROR SUMMARY' \
| grep -v 'Memcheck,' \
| grep -v 'Copyright' \
| grep -v 'Using Valgrind' \
| grep -v 'For counts of' \
| mgrepv 'mlr_try_float_from_string' \
| mgrepv '__snprintf_chk' \
| mgrepv 'vsscanf_l' \
| mgrepv 'NXMapRemove' \
| mgrepv '_platform_memchr' \
| mgrepv 'xpc_pipe_routine' \
| grep -v 'MACH_SEND_TRAILER' \
| mgrepv 'mlr_dsl_lexer_lex' \
| mgrepv 'mlr_dsl_parse' \
| mgrepv 'unbackslash' \
| cat
#| mgrepv 'parse_command_line'