fmcadc100m14b4cha.sh 1.35 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
#!/bin/sh

# Copyright CERN, 2011
# Author: Matthieu Cattin <matthieu.cattin@cern.ch>
# Licence: GPL v2 or later.
# Website: http://www.ohwr.org

LOGDIR=./log_fmcadc100m14b4cha

mkdir -p $LOGDIR
sudo rm -fr $LOGDIR/pts*

13 14
echo " "

15 16
serial=$1
if [ x$1 = x"" ]; then
17
	echo -n "Please scan CERN bar-code serial number, then press [ENTER]: "
18 19 20 21 22 23 24 25 26
        read serial
fi

if [ x$serial = x"" ]; then
	serial=0000
fi

extra_serial=$2
if [ x$2 = x"" ]; then
27
	echo -n "If needed input extra serial number and press [ENTER] OR just press [ENTER]: "
28 29 30 31 32 33 34
        read extra_serial
fi

if [ x$extra_serial = x"" ]; then
	extra_serial=0000
fi

35 36 37 38 39 40 41
nb_test_limit=2
nb_test=1

while [ "$nb_test" -le "$nb_test_limit" ]
do
    echo "--------------------------------------------------------------"
    echo "Test series run $nb_test out of $nb_test_limit"
42
    echo " "
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62

    sudo ./pts.py -b FmcAdc100M14b4cha -s $serial -e $extra_serial -t./test/fmcadc100m14b4cha/python -l $LOGDIR 00 01 02 03 04 05 06 07 08 09

    if [ "$nb_test" != "$nb_test_limit" ]
    then
        echo " "
        echo -n "Do you want to run the test series again [y,n]? "
        read reply
        if [ "$reply" != "y" ]
        then
            break
        fi
    fi
    let "nb_test+=1"
done

echo "--------------------------------------------------------------"
echo " "
echo -n "End of the test, press [ENTER] to exit... "
read tmp