Updated ChangeLogs one more time.
[geda-gaf/whiteaudio.git] / gnetlist / tests / runtest.sh
blob381f5e59fec5bac013e1ac89b6d1e7f7d99e734e
1 #!/bin/sh
3 INPUT=$1
4 BACKEND=$2
5 BUILDDIR=$3
6 SRCDIR=$4
7 EXTRADIFF=$5
9 TESTDIR=${BUILDDIR}
10 export TESTDIR
12 schbasename=`basename $INPUT .sch`
14 ../src/gnetlist -o ${BUILDDIR}/new_${schbasename}.$BACKEND -g $BACKEND $INPUT
15 status=$?
17 if [ "$status" != 0 ]
18 then
19 echo FAILED: gnetlist returned non-zero exit status
20 exit 1
23 sed '/gnetlist.*-g/d' ${SRCDIR}/${schbasename}.$BACKEND > \
24 ${BUILDDIR}/${schbasename}.${BACKEND}.filtered
25 sed '/gnetlist.*-g/d' ${BUILDDIR}/new_${schbasename}.$BACKEND > \
26 ${BUILDDIR}/new_${schbasename}.${BACKEND}.filtered
27 diff $EXTRADIFF ${BUILDDIR}/${schbasename}.${BACKEND}.filtered \
28 ${BUILDDIR}/new_${schbasename}.${BACKEND}.filtered
29 status=$?
31 rm ${BUILDDIR}/${schbasename}.${BACKEND}.filtered ${BUILDDIR}/new_${schbasename}.${BACKEND}.filtered
32 if [ "$status" != 0 ]
33 then
34 exit 2