3 # smilint-FORMAT.test --
5 # smilint test for various input formats.
8 # Check `smilint -l9' output for all TESTMIBS read from dumps/xxx/
9 # against nominal dumps/smilint-xxx/ output files.
12 FORMAT=`echo $0 | sed -e 's/^.*smilint-\(.*\).test/\1/'`
13 ACTUALDIR=smilint-${FORMAT}.out
14 NOMINALDIR=dumps/smilint-${FORMAT}
21 for mib in ${TESTMIBS} ; do
22 echo "comparing \`smilint -l9 dumps/${FORMAT}/$mib' output with ${NOMINALDIR}/*."
24 ../../tools/smilint -c/dev/null -l9 ../dumps/${FORMAT}/$mib > $mib 2>&1
26 /usr/bin/diff --ignore-matching-lines='generated by smidump' --ignore-matching-lines='$Id.*$' --ignore-matching-lines='@author.*smidump' ${ACTUALDIR}/$mib ${NOMINALDIR}/$mib > ${ACTUALDIR}/$mib.diff
27 if [ ! -s ${ACTUALDIR}/$mib.diff ] ; then
28 rm ${ACTUALDIR}/$mib.diff
34 if [ "$FAILED" ] ; then
35 echo "*** smilint output differs, see ${ACTUALDIR}/*.diff"
40 cat > sync-dumps <<EOF
44 # This script copies test output files to the nominal files in the
45 # dumps/ directory. It MUST ONLY be executed after carefully ensuring
46 # that the current output files are valid. Otherwise the sense of
47 # this test suite would be dubious.
51 if [ "\$1" == "-f" ] ; then CMDPREFIX="" ; fi