refdes_renum: warn of possible number clash with non-conforming values
[geda-gaf/whiteaudio.git] / gsymcheck / tests / runtest.sh
blob7b99577b65d5ecb755318304691299738c029d3f
1 #!/bin/sh
3 INPUT=$1
4 BUILDDIR=$2
5 SRCDIR=$3
6 rundir=${BUILDDIR}/run
8 # create temporary run directory and required subdirs
9 mkdir -m 0700 -p ${rundir}
10 rc=$?
11 if test $rc -ne 0 ; then
12 echo "Failed to create directory ${rundir} with appropriate permissions"
13 echo "mkdir returned $rc"
14 exit 1
17 TESTDIR=${BUILDDIR}
18 export TESTDIR
20 symbasename=`basename $INPUT .sym`
22 in="${INPUT}"
23 ref="${SRCDIR}/${symbasename}.output"
24 new="${rundir}/new_${symbasename}.output"
25 tmpfile=${rundir}/tmp$$
27 ${BUILDDIR}/../src/gsymcheck -vv ${in} 1> ${tmpfile} 2> ${rundir}/allerrors.output
29 cat ${tmpfile} | \
30 grep -v "gEDA/gsymcheck version" | \
31 grep -v "ABSOLUTELY NO WARRANTY" | \
32 grep -v "This is free software" | \
33 grep -v "the COPYING file" | \
34 grep -v "Checking: " | \
35 grep -v '^$' > ${new}
36 rm -f ${tmpfile}
38 diff "${ref}" "${new}"
39 status=$?
41 rm -rf $rundir
43 if test $status -ne 0; then
44 exit 2
47 exit 0