41 lines
804 B
Bash
41 lines
804 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 ">>>>>>> Updating from CVS <<<<<<<<"
|
|
(cd $CONTIKI && cvs update -dP)
|
|
|
|
echo ">>>>>>> Building COOJA <<<<<<<<"
|
|
(cd $CONTIKI/tools/cooja && ant clean && ant jar)
|
|
|
|
echo ">>>>>>> Creating test log <<<<<<<<"
|
|
rm -f *.log
|
|
LOG="TEST-`date '+%F'`.log"
|
|
touch $LOG
|
|
echo "" >> $LOG
|
|
echo "Starting test run ($LOG)"
|
|
|
|
for myfile in ./*.csc
|
|
do
|
|
TEST=`basename $myfile .csc`
|
|
./RUN_TEST $TEST $LOG
|
|
echo "" >> $LOG
|
|
done
|
|
|
|
echo ">>>>>>> Sending mail <<<<<<<<"
|
|
cp $LOG ~/lastlog.log
|
|
cat $LOG | mail -s "Contiki test results" $MAILTO
|