2008-04-23 15:19:13 +00:00
|
|
|
#!/bin/bash
|
2008-04-22 14:29:05 +00:00
|
|
|
|
2008-09-17 21:42:19 +00:00
|
|
|
if [ -z "$CONTIKI" ]; then
|
|
|
|
echo Undefined variable: CONTIKI
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z "$MAILTO" ]; then
|
|
|
|
echo Undefined variable: MAILTO
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2008-04-29 04:43:27 +00:00
|
|
|
echo ">>>>>>> Cleaning up previous tests <<<<<<<<"
|
|
|
|
rm -f *.log *.cooja_log
|
|
|
|
rm -fr se obj_cooja
|
|
|
|
rm -f symbols.c symbols.h
|
2008-04-24 06:17:26 +00:00
|
|
|
|
2008-04-29 04:43:27 +00:00
|
|
|
echo ">>>>>>> Creating test log <<<<<<<<"
|
2008-09-18 07:38:48 +00:00
|
|
|
#LOG="TEST-`date '+%F'`.log"
|
|
|
|
LOG=currentlog.log
|
2008-04-23 15:19:13 +00:00
|
|
|
touch $LOG
|
2008-09-18 15:10:11 +00:00
|
|
|
echo "Starting test run `date '+%F %T'`"
|
|
|
|
echo "Test run started at `date '+%F %T'`" >> $LOG
|
2008-09-18 07:38:48 +00:00
|
|
|
echo "" >> $LOG
|
2008-09-18 07:25:27 +00:00
|
|
|
|
|
|
|
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)
|
2008-04-24 06:17:26 +00:00
|
|
|
|
2008-09-18 07:25:27 +00:00
|
|
|
echo "Starting tests" >> $LOG
|
2008-09-18 15:10:11 +00:00
|
|
|
echo "" >> $LOG
|
2008-04-22 14:29:05 +00:00
|
|
|
for myfile in ./*.csc
|
|
|
|
do
|
2008-09-17 21:42:19 +00:00
|
|
|
TEST=`basename $myfile .csc`
|
|
|
|
./RUN_TEST $TEST $LOG
|
|
|
|
echo "" >> $LOG
|
2008-04-23 15:19:13 +00:00
|
|
|
done
|
2008-04-29 04:43:27 +00:00
|
|
|
|
2008-09-17 21:42:19 +00:00
|
|
|
echo ">>>>>>> Sending mail <<<<<<<<"
|
2008-09-18 07:25:27 +00:00
|
|
|
echo "Mailing test report" >> $LOG
|
2008-09-17 21:42:19 +00:00
|
|
|
cp $LOG ~/lastlog.log
|
|
|
|
cat $LOG | mail -s "Contiki test results" $MAILTO
|