| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
namd=$NAMD_BIN |
| 4 |
|
| 5 |
short="apbs-solvation.conf apbs-visualization.conf" |
| 6 |
long="apbs-md.conf" |
| 7 |
|
| 8 |
arg=$1; |
| 9 |
case $arg in |
| 10 |
all|long) |
| 11 |
tests="$short $long" |
| 12 |
;; |
| 13 |
short) |
| 14 |
tests="$short" |
| 15 |
;; |
| 16 |
*) |
| 17 |
tests="$short" |
| 18 |
;; |
| 19 |
esac; |
| 20 |
|
| 21 |
awkdiff=../../../../test/ndiff.awk |
| 22 |
|
| 23 |
export MCSH_HOME=/dev/null |
| 24 |
|
| 25 |
# error for result comparison |
| 26 |
ABSERR=1.0e-6 |
| 27 |
|
| 28 |
for i in $tests |
| 29 |
do |
| 30 |
base=`basename $i .conf` |
| 31 |
echo "Working on $base ..." |
| 32 |
$namd $i > $base.out |
| 33 |
echo -n "Diffing ... " |
| 34 |
tmpfile=`mktemp ./tmp.XXX` || exit 1 |
| 35 |
tmpsave=`mktemp ./tmp.XXX` || exit 1 |
| 36 |
tmpout=`mktemp ./tmp.XXX` || exit 1 |
| 37 |
egrep -v "Info:|WallClock:" save/${base}.out.save > $tmpsave |
| 38 |
egrep -v "Info:|WallClock:" ${base}.out > $tmpout |
| 39 |
awk -f $awkdiff -v ABSERR=${ABSERR} $tmpsave $tmpout > $tmpfile |
| 40 |
if [ -s $tmpfile ] ; then |
| 41 |
mv $tmpfile ${base}.out.diff |
| 42 |
echo "failed, see ${base}.out.diff." |
| 43 |
else |
| 44 |
echo "passed." |
| 45 |
rm $tmpfile |
| 46 |
|
| 47 |
fi |
| 48 |
rm -f $tmpsave $tmpout |
| 49 |
done |