|
From: <sv...@va...> - 2005-07-02 20:41:31
|
Author: sewardj Date: 2005-07-02 21:41:25 +0100 (Sat, 02 Jul 2005) New Revision: 4088 Log: Improve filtering to get rid of suppressions, using magic incantations from Tom H and Ashley Pittman. Modified: trunk/memcheck/tests/filter_xml Modified: trunk/memcheck/tests/filter_xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/memcheck/tests/filter_xml 2005-07-02 20:11:59 UTC (rev 4087) +++ trunk/memcheck/tests/filter_xml 2005-07-02 20:41:25 UTC (rev 4088) @@ -6,4 +6,20 @@ sed "s/<ppid>[0-9]*<\/ppid>/<ppid>...<\/ppid>/" | sed "s/<obj>.*<\/obj>/<obj>...<\/obj>/" | sed "s/<line>.*<\/line>/<line>...<\/line>/" | -sed "s/<dir>.*<\/dir>/<dir>...<\/dir>/" +sed "s/<dir>.*<\/dir>/<dir>...<\/dir>/" | +sed "s/<count>.*<\/count>/<count>...<\/count>/" | +perl -0 -p -e "s/<suppcounts>.*<\/suppcounts>/<suppcounts>...<\/suppcoun= ts>/s" + +# Collected wisdom re Perl magic incantation: +# +# From: Tom Hughes +# +# Two problems - one is that you need -p to force perl to loop over=20 +# the input lines and apply your expression to each one and then print +# the results. +#=20 +# The other is that as somebody else said you need to change the input +# record separator so that it reads in the whole file as a single line +# which you can do with the -0 switch. +# +# Hence -0 -p. |