summaryrefslogtreecommitdiff
path: root/gsl-1.9/siman/siman_test_driver.sh
blob: 21b393ccfec39cc03ca1e15f253808189e404036 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /bin/sh

# assume good result from tests; increment it if any test fails
EXIT_STATUS=0

for seed in "" 12345 ;
do 
./siman_test > siman_test.out 2>&1
SECOND_LAST_ENERGY=`tail -2 siman_test.out1 | head -1 | awk '{print $4}'`
LAST_ENERGY=`tail -1 siman_test.out1 | awk '{print $4}'`
# echo " " $SECOND_LAST_ENERGY $LAST_ENERGY
if [ $SECOND_LAST_ENERGY = $LAST_ENERGY ];
then
    echo -n "PASS: "
else
    echo -n "FAIL: "
    EXIT_STATUS=`expr $EXIT_STATUS + 1`
fi
echo "simulated annealing test (travelling salesman problem) seed=${seed:-default}"
done

exit $EXIT_STATUS