filter for dejagnu output?

Kaveh R. Ghazi
Fri Dec 26 11:03:00 GMT 1997

 > From: Robert Lipe <>
 > Several on this list regularly run dejagnu on our targets.   It looks
 > like most of us take the *.sum files and boil down what we think are
 > the interesting parts.    Of course, we all do it differently. ;-)
 > Is there an awk/perl/tcl/whatever script around that makes a meaningful
 > summary of the *.sum and *.log files?
 > Thanx,
 > RJL

	If you redirect egcs "make check" or c-torture ctest output into
a file, you can run this script over it and get a simple summary.  Its
nothing more than a glorified egrep, but it saves me some typing. 


# This is a script to egrep useful summary info out of gcc test output.
# The -e flag is used with egcs "make check" output, and the -c flag
# is used with c-torture "ctest" output.  One of the two is required.
# By Kaveh Ghazi  (12/4/97)

usage="Usage: `basename $0`"' -c|-e filename...'

while test -n "$1" ; do
  case "$1" in
    -e) pattern='FAIL:|PASS:|#|===|^[ 	]*$' ; shift ;;
    -c) pattern='^TEST|^Test|^ERROR:' ; shift ;;
    -*) echo "Bad argument: <$1>" 1>&2 ; echo "$usage" 1>&2 ; exit 1 ;;
    *) break ;;

if test -z "$pattern" -o $# -eq 0 ; then
  echo "$usage" 1>&2
  exit 1

egrep "$pattern" "$@"

More information about the Gcc mailing list