1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
#!/bin/bash
#
# Scott Burleigh
# April 21, 2010
# documentation boilerplate
CONFIGFILES=" \
./amroc.ltprc \
./amroc.bprc \
./global.ionrc \
./amroc.ionrc \
./amroc.ionconfig \
./amroc.ionsecrc \
./amroc.ipnrc \
./mib.amsrc
"
#./amsmib.xml
echo "########################################"
echo
pwd | sed "s/\/.*\///" | xargs echo "NAME: "
echo
echo "PURPOSE: Verify basic AMS functionality."
echo
echo "CONFIG: A simple AMS message space:"
echo
for N in $CONFIGFILES
do
echo "$N:"
cat $N
echo "# EOF"
echo
done
echo "OUTPUT: Searching for message reception stats in the amsbenchr output."
echo
echo "########################################"
echo "Cleaning up old ION..."
./cleanup
sleep 1
echo "Starting ION..."
export ION_NODE_LIST_DIR=$PWD
# Start node 9.
./ionstart
# Start message logger.
amsbenchr > test_output &
sleep 1
# Start message sender.
amsbenchs 10 100 &
sleep 2
killall amsbenchs &> /dev/null
# Verify message was received.
RETVAL=0
echo "Checking test_output for 'Received 10 messages, a total of 1000 bytes'"
COUNT=`grep "Received 10 messages, a total of 1000 bytes" test_output | wc -l`
if [ $COUNT -eq 1 ]
then
echo "OK: Messages received."
else
echo "ERROR: Messages not received."
RETVAL=1
fi
# Shut down ION processes.
echo "Stopping ION..."
./ionstop
echo "AMS basic functionality test completed."
exit $RETVAL
|