File: siman_test_driver.sh

package info (click to toggle)
gsl-doc 2.3-1
  • links: PTS
  • area: non-free
  • in suites: buster
  • size: 27,748 kB
  • ctags: 15,177
  • sloc: ansic: 235,014; sh: 11,585; makefile: 925
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