scheme-api: Correct some comments.
[geda-gaf/whiteaudio.git] / gnetlist / tests / runtest.sh
blob6a10fca25fd9e079fec7346f7a94d20ef2e19d7e
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 SCMDIR=$SRCDIR/../scheme \
15 SYMDIR=$SRCDIR/../../symbols \
16 GEDADATARC=$BUILDDIR/../lib \
17 ../src/gnetlist -L ${SRCDIR}/../../libgeda/scheme \
18 -L ${BUILDDIR}/../../libgeda/scheme \
19 -o ${BUILDDIR}/new_${schbasename}.$BACKEND -g $BACKEND $INPUT
20 status=$?
22 if [ "$status" != 0 ]
23 then
24 echo FAILED: gnetlist returned non-zero exit status
25 exit 1
28 sed '/gnetlist.*-g/d' ${SRCDIR}/${schbasename}.$BACKEND > \
29 ${BUILDDIR}/${schbasename}.${BACKEND}.filtered
30 sed '/gnetlist.*-g/d' ${BUILDDIR}/new_${schbasename}.$BACKEND > \
31 ${BUILDDIR}/new_${schbasename}.${BACKEND}.filtered
32 diff $EXTRADIFF ${BUILDDIR}/${schbasename}.${BACKEND}.filtered \
33 ${BUILDDIR}/new_${schbasename}.${BACKEND}.filtered
34 status=$?
36 rm ${BUILDDIR}/${schbasename}.${BACKEND}.filtered ${BUILDDIR}/new_${schbasename}.${BACKEND}.filtered
37 if [ "$status" != 0 ]
38 then
39 exit 2