File: siman_test_driver.sh

package info (click to toggle)
gsl 2.8%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 29,088 kB
  • sloc: ansic: 269,984; sh: 4,535; makefile: 902; python: 69
file content (22 lines) | stat: -rwxr-xr-x 574 bytes parent folder | download | duplicates (20)
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