diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-03-23 18:02:17 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-03-23 18:02:17 +0000 |
commit | 9b8baa128b4e7d0696f9ad995927cf2e5162649f (patch) | |
tree | 0dc430b7dd5a70d7025e20227696d5d7cfd95441 /c/src/tests/tools/generic/difftest.in | |
parent | Regenerated. (diff) | |
download | rtems-9b8baa128b4e7d0696f9ad995927cf2e5162649f.tar.bz2 |
Automake II patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>. Email
description follows:
Description:
* automake for *all* tool subdirectories (Makefile.am, configure.in etc.)
* autogen now also considers CONFIG_HEADER (generates stamp-h.ins and
config.h.ins)
* c/src/tests/tools/generic/difftest and
c/src/tests/tools/generic/sorttimes generated by configure scripts
* c/update-tools/ampolish, beautifier for Makefile.ams, similar to
acpolish
* rtems-polish.sh added to c/update-tools/ + ampolish support
* New subdirectory ./automake, contains automake -Makefile fragments to
support RTEMS make "debug, debug_install, profile, profile_install" for
native Makefile.ams (== ignore these make targets).
* aclocal/rtems-top.m4's RTEMS_TOP now reads the automake makefile
variable VERSION from RTEMS ./VERSION file.
* ./configure.in uses the macros from aclocal + support for the tools'
configure scripts
Remarks:
* To run rtems-polish.sh, "cd <rtems-source-tree>;
./c/update-tools/rtems-polish.sh"
* AFAIS, now all native subdirectories are converted to automake (Please
drop me a note, if I forgot something).
* Unless you notice something fatal, IMO the time has come for a public
try (== snapshot). I do not intend to send more automake related patches
within, say 2 weeks, to give these patches time to settle and to give me
some time to think on how to continue.
* The patch assumes installation to the new main installation directory
[$(prefix)].
Diffstat (limited to 'c/src/tests/tools/generic/difftest.in')
-rw-r--r-- | c/src/tests/tools/generic/difftest.in | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/c/src/tests/tools/generic/difftest.in b/c/src/tests/tools/generic/difftest.in new file mode 100644 index 0000000000..83edae907b --- /dev/null +++ b/c/src/tests/tools/generic/difftest.in @@ -0,0 +1,115 @@ +#!@KSH@ -p +# +# Check test results against official output from the src tree +# +# $Id$ +# + +# XXX: do not run size.exe with this; it asks questions we don't answer + +# how to do arith in bash +# i=$((i * 2)) +# b=$((b + 1)) + +# progname=`basename $0` +progname=${0##*/} # fast basename hack for ksh, bash + +USAGE=\ +"usage: $progname [ -opts ] test [ test ... ] + -v -- verbose + -l logdir -- specify log directory (default is 'logdir') +" + +# log an error to stderr +prerr() +{ + echo "$*" >&2 +} + +fatal() { + [ "$1" ] && prerr $* + prerr "$USAGE" + exit 1 +} + +warn() { + [ "$1" ] && prerr $* +} + +# +# process the options +# +# defaults for getopt vars +# + +verbose="" +logdir=log + +while getopts v12o:l: OPT +do + case "$OPT" in + v) + verbose="yes";; + l) + logdir="$OPTARG";; + *) + fatal;; + esac +done +shiftcount=`expr $OPTIND - 1` +shift $shiftcount + +args=$* + +# +# Run the tests +# + +test -d $logdir || fatal "No log directory: ./$logdir" + +tests="$args" +if [ ! "$tests" ] +then + cd $logdir + set -- `ls -1 sp* mp??_? psx* sp*_g mp*_?_g psx*_g 2>/dev/null | grep -v info` + cd .. + tests="$*" +fi + +for t in $tests +do + logfile=$t + + if [ ! -f $logdir/$logfile ] + then + continue + fi + + echo $logfile + echo + + case $t in + mp*) + mptest=`echo $t | sed 's/_.//'` + node=`echo $t | sed 's/...._//'` + tmp_scn_file=mptests/node$node/$mptest.scn;; + sp*) + tmp_scn_file=sptests/$t.scn;; + psx*) + tmp_scn_file=psxtests/$t.scn;; + *) + fatal "unknown test $t";; + esac + + scn_file=`echo $tmp_scn_file | sed -e s/_g//` + sed -e '/^$/d' < $logdir/$logfile | diff -b screens/$scn_file - + echo + echo +done + +exit 0 + +# Local Variables: *** +# mode:ksh *** +# End: *** + |