source: rtems/testsuites/tools/generic/difftest.in @ 9b8baa1

4.104.114.84.95
Last change on this file since 9b8baa1 was 9b8baa1, checked in by Joel Sherrill <joel.sherrill@…>, on 03/23/99 at 18:02:17

Automake II patch from Ralf Corsepius <corsepiu@…>. 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)].
  • Property mode set to 100644
File size: 1.8 KB
Line 
1#!@KSH@ -p
2#
3#  Check test results against official output from the src tree
4#
5#  $Id$
6#
7
8# XXX: do not run size.exe with this; it asks questions we don't answer
9
10# how to do arith in bash
11#    i=$((i * 2))
12#    b=$((b + 1))
13
14# progname=`basename $0`
15progname=${0##*/}        # fast basename hack for ksh, bash
16
17USAGE=\
18"usage: $progname [ -opts ] test [ test ... ]
19        -v          -- verbose
20        -l logdir   -- specify log directory (default is 'logdir')
21"
22
23#   log an error to stderr
24prerr()
25{
26    echo "$*" >&2
27}
28
29fatal() {
30    [ "$1" ] && prerr $*
31    prerr "$USAGE"
32    exit 1
33}
34
35warn() {
36    [ "$1" ] && prerr $*
37}
38
39#
40# process the options
41#
42# defaults for getopt vars
43#
44
45verbose=""
46logdir=log
47
48while getopts v12o:l: OPT
49do
50    case "$OPT" in
51        v)
52            verbose="yes";;
53        l)
54            logdir="$OPTARG";;
55        *)
56            fatal;;
57    esac
58done
59shiftcount=`expr $OPTIND - 1`
60shift $shiftcount
61
62args=$*
63
64#
65# Run the tests
66#
67
68test -d $logdir || fatal "No log directory: ./$logdir"
69
70tests="$args"
71if [ ! "$tests" ]
72then
73     cd $logdir
74     set -- `ls -1 sp* mp??_? psx* sp*_g mp*_?_g psx*_g 2>/dev/null | grep -v info`
75     cd ..
76     tests="$*"
77fi
78
79for t in $tests
80do
81   logfile=$t
82
83   if [ ! -f $logdir/$logfile ]
84   then
85        continue
86   fi
87
88   echo $logfile
89   echo
90
91   case $t in
92       mp*)
93           mptest=`echo $t | sed 's/_.//'`
94           node=`echo $t | sed 's/...._//'`
95           tmp_scn_file=mptests/node$node/$mptest.scn;;
96       sp*)
97           tmp_scn_file=sptests/$t.scn;;
98       psx*)
99           tmp_scn_file=psxtests/$t.scn;;
100       *)
101           fatal "unknown test $t";;
102   esac
103
104   scn_file=`echo $tmp_scn_file | sed -e s/_g//`
105   sed -e '/^$/d' < $logdir/$logfile | diff -b screens/$scn_file -
106   echo
107   echo
108done
109
110exit 0
111
112# Local Variables: ***
113# mode:ksh ***
114# End: ***
115
Note: See TracBrowser for help on using the repository browser.