This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: filter for dejagnu output?


 > From: Robert Lipe <robertl@dgii.com>
 > 
 > 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. 

		--Kaveh


#!/bin/sh
#
# 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)  ghazi@caip.rutgers.edu.

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 ;;
  esac
done

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

egrep "$pattern" "$@"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]