This commit was generated by cvs2svn to track changes on a CVS vendor
[external/binutils.git] / gdb / config / djgpp / djcheck.sh
1 #!/bin/sh
2
3 # A shell script to run the test suite on the DJGPP version of GDB.
4
5 ORIGDIR=`pwd`
6 GDB=${ORIGDIR}/../gdb.exe
7 SUBDIRS=`find $ORIGDIR -type d ! -ipath $ORIGDIR`
8
9 for d in $SUBDIRS
10 do
11   cd $d
12   echo "Running tests in $d..."
13   for f in *.out
14   do
15     test -f $f || break
16     base=`basename $f .out`
17     if test "${base}" = "dbx" ; then
18         options=-dbx
19     else
20         options=
21     fi
22     $GDB ${options} < ${base}.in 2>&1 \
23       | sed -e '/GNU gdb /s/ [.0-9][.0-9]*//' \
24             -e '/^Copyright/s/[12][0-9][0-9][0-9]/XYZZY/g' \
25             -e '/Starting program: /s|[A-z]:/.*/||' \
26             -e '/main (/s/=0x[0-9a-f][0-9a-f]*/=XYZ/g' \
27       > ${base}.tst
28     if diff --binary -u ${base}.out ${base}.tst ; then
29       rm -f ${base}.tst
30     fi
31   done
32 done
33