printing tail of cooja output in test report
This commit is contained in:
parent
b9372090db
commit
e3385f8e3b
|
@ -19,8 +19,8 @@ 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 "Starting test run `date '+%F %T'`"
|
||||
echo "Test run started at `date '+%F %T'`" >> $LOG
|
||||
echo "" >> $LOG
|
||||
|
||||
echo ">>>>>>> Updating from CVS <<<<<<<<"
|
||||
|
@ -32,6 +32,7 @@ echo "Building COOJA" >> $LOG
|
|||
(cd $CONTIKI/tools/cooja && ant clean && ant jar)
|
||||
|
||||
echo "Starting tests" >> $LOG
|
||||
echo "" >> $LOG
|
||||
for myfile in ./*.csc
|
||||
do
|
||||
TEST=`basename $myfile .csc`
|
||||
|
|
|
@ -14,34 +14,27 @@ if [ -f "COOJA.log" ]; then
|
|||
mv COOJA.log $TEST.cooja_log
|
||||
fi
|
||||
|
||||
OK=0
|
||||
if [ -f "$TEST.log" ]; then
|
||||
OK=`grep "TEST OK" $TEST.log | wc -l`
|
||||
fi
|
||||
|
||||
if [ $OK == 0 ]; then
|
||||
echo "$TEST: FAIL" >> $LOG
|
||||
if [ -f "$TEST.info" ]; then
|
||||
echo "--LOG INFO START ($TEST.info) --" >> $LOG
|
||||
cat $TEST.info >> $LOG
|
||||
echo "" >> $LOG
|
||||
echo "--LOG INFO END --" >> $LOG
|
||||
else
|
||||
echo "-- NO TEST INFO AVAILABLE ($TEST.info) --" >> $LOG
|
||||
fi
|
||||
|
||||
else
|
||||
echo "$TEST: OK" >> $LOG
|
||||
fi
|
||||
|
||||
else
|
||||
echo "$TEST: FAIL (no output)" >> $LOG
|
||||
if [ $OK == 0 ]; then
|
||||
echo "$TEST: FAIL" >> $LOG
|
||||
if [ -f "$TEST.info" ]; then
|
||||
echo "--LOG INFO START ($TEST.info) --" >> $LOG
|
||||
cat $TEST.info >> $LOG
|
||||
echo "" >> $LOG
|
||||
echo "-- TEST INFO END --" >> $LOG
|
||||
echo "--LOG INFO END --" >> $LOG
|
||||
else
|
||||
echo "-- NO TEST INFO AVAILABLE ($TEST.info) --" >> $LOG
|
||||
echo "-- NO LOG INFO AVAILABLE ($TEST.info) --" >> $LOG
|
||||
fi
|
||||
echo "-- OUTPUT TAIL START ($TEST.cooja_log) --" >> $LOG
|
||||
tail -5 $TEST.cooja_log >> $LOG
|
||||
echo "-- OUTPUT TAIL END --" >> $LOG
|
||||
|
||||
else
|
||||
echo "$TEST: OK" >> $LOG
|
||||
fi
|
||||
|
||||
echo "" >> $LOG
|
||||
|
|
Loading…
Reference in a new issue