checking cvs and compile return results

This commit is contained in:
fros4943 2008-09-20 10:17:32 +00:00
parent 1f1112618a
commit f21a4e54ae

View file

@ -10,6 +10,12 @@ if [ -z "$MAILTO" ]; then
exit exit
fi fi
function mail_report {
echo ">>>>>>> Sending mail <<<<<<<<"
cp $LOG ~/lastlog.log
cat $LOG | mail -s "Contiki test results" $MAILTO
}
echo ">>>>>>> Cleaning up previous tests <<<<<<<<" echo ">>>>>>> Cleaning up previous tests <<<<<<<<"
rm -f *.log *.cooja_log rm -f *.log *.cooja_log
rm -fr se obj_cooja rm -fr se obj_cooja
@ -24,14 +30,25 @@ echo "Test run started at `date '+%F %T'`" >> $LOG
echo "" >> $LOG echo "" >> $LOG
echo ">>>>>>> Updating from CVS <<<<<<<<" echo ">>>>>>> Updating from CVS <<<<<<<<"
echo "Updating anonymous Sourceforge CVS" >> $LOG echo -n "Updating CVS: " >> $LOG
(cd $CONTIKI && cvs update -dP) (cd $CONTIKI && cvs update -dP)
if [ "$?" != "0" ]; then
echo "FAIL" >> $LOG
mail_report
exit
fi
echo "OK" >> $LOG
echo ">>>>>>> Building COOJA <<<<<<<<" echo ">>>>>>> Building COOJA <<<<<<<<"
echo "Building COOJA" >> $LOG echo -n "Building COOJA: " >> $LOG
(cd $CONTIKI/tools/cooja && ant clean && ant jar) (cd $CONTIKI/tools/cooja && ant clean && ant jar)
if [ "$?" != "0" ]; then
echo "FAIL" >> $LOG
mail_report
exit
fi
echo "OK" >> $LOG
echo "Starting tests" >> $LOG
echo "" >> $LOG echo "" >> $LOG
for myfile in ./*.csc for myfile in ./*.csc
do do
@ -40,7 +57,4 @@ do
echo "" >> $LOG echo "" >> $LOG
done done
echo ">>>>>>> Sending mail <<<<<<<<" mail_report
echo "Mailing test report" >> $LOG
cp $LOG ~/lastlog.log
cat $LOG | mail -s "Contiki test results" $MAILTO