osd-contiki/tools/cooja/contiki_tests/RUN_ALL
2008-09-18 07:38:48 +00:00

46 lines
997 B
Bash

#!/bin/bash
if [ -z "$CONTIKI" ]; then
echo Undefined variable: CONTIKI
exit
fi
if [ -z "$MAILTO" ]; then
echo Undefined variable: MAILTO
exit
fi
echo ">>>>>>> Cleaning up previous tests <<<<<<<<"
rm -f *.log *.cooja_log
rm -fr se obj_cooja
rm -f symbols.c symbols.h
echo ">>>>>>> Creating test log <<<<<<<<"
#LOG="TEST-`date '+%F'`.log"
LOG=currentlog.log
touch $LOG
echo "Starting test run ($LOG)"
echo "Test run started: ($LOG)" >> $LOG
echo "" >> $LOG
echo ">>>>>>> Updating from CVS <<<<<<<<"
echo "Updating anonymous Sourceforge CVS" >> $LOG
(cd $CONTIKI && cvs update -dP)
echo ">>>>>>> Building COOJA <<<<<<<<"
echo "Building COOJA" >> $LOG
(cd $CONTIKI/tools/cooja && ant clean && ant jar)
echo "Starting tests" >> $LOG
for myfile in ./*.csc
do
TEST=`basename $myfile .csc`
./RUN_TEST $TEST $LOG
echo "" >> $LOG
done
echo ">>>>>>> Sending mail <<<<<<<<"
echo "Mailing test report" >> $LOG
cp $LOG ~/lastlog.log
cat $LOG | mail -s "Contiki test results" $MAILTO