#!/bin/sh ############################################################# # Tests on NOMAD1 # Option -fill to fill the tests files test.? ############################################################# tt=/tmp/t$$ d=`dirname $0` p=nomad1 prog=$d/$p case `uname -m` in sun*) tail="tail" ;; *) tail="tail -n" esac # Test with local program if existing test -x $prog || prog=$d/../bin/$p if test -x $prog; then echo "----Testing $prog" else echo "****Program $prog missing****" exit 1 fi st=0 for f in test.? ; do q=`head -1 $f | tr -d '#'` echo $f $q | awk '{printf "....%-60s ",$0}' $tail +2 $f | grep -v '^#\.' > $tt.0 $prog $q | grep -v '^#\.' > $tt.1 if [ "$1" = "-fill" ]; then echo " (fill)" echo "# $q" > $f cat $tt.1 >> $f elif cmp $tt.0 $tt.1; then echo " (ok)" else echo " ***error:" diff $tt.0 $tt.1 echo "====Report the problem to Francois Ochsenbein" echo " francois@astro.u-strasbg.fr" st=1 fi rm -f $tt.? done exit $st