minor script updates
This commit is contained in:
parent
e6fa5334ae
commit
28a9b815b5
3 changed files with 27 additions and 5 deletions
|
@ -24,7 +24,7 @@ done
|
||||||
if [ -z "$CONTIKI" ]; then
|
if [ -z "$CONTIKI" ]; then
|
||||||
if [ -z "$CONTIKI_HOME" ]; then
|
if [ -z "$CONTIKI_HOME" ]; then
|
||||||
CONTIKI_HOME=../../..
|
CONTIKI_HOME=../../..
|
||||||
echo Undefined variable: CONTIKI. Using default: ${CONTIKI}
|
echo Undefined variable: CONTIKI_HOME. Using default: ${CONTIKI_HOME}
|
||||||
fi
|
fi
|
||||||
CONTIKI=$CONTIKI_HOME
|
CONTIKI=$CONTIKI_HOME
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -35,7 +35,7 @@ fi
|
||||||
for COUNTER in `seq 1 $REPEATS`;
|
for COUNTER in `seq 1 $REPEATS`;
|
||||||
do
|
do
|
||||||
echo ">>>>>>> Repeating $COUNTER/$REPEATS <<<<<<<<"
|
echo ">>>>>>> Repeating $COUNTER/$REPEATS <<<<<<<<"
|
||||||
bash RUN_TEST $TEST $TEST$COUNTER.log
|
bash RUN_TEST $TEST $TEST$COUNTER.log -keeplog
|
||||||
done
|
done
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|
|
@ -1,14 +1,29 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ $# -lt 1 -o $# -gt 2 ]; then
|
if [ $# -lt 1 -o $# -gt 3 ]; then
|
||||||
echo "Usage: $0 <test> [logfile]"
|
echo "Usage: $0 <test> [logfile] [-keeplog]"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TEST=$1
|
TEST=$1
|
||||||
|
|
||||||
LOGFILE=0
|
LOGFILE=0
|
||||||
if [ $# -eq 2 ]; then
|
if [ $# -gt 1 ]; then
|
||||||
LOGFILE=1
|
LOGFILE=1
|
||||||
LOG=$2
|
LOG=$2
|
||||||
|
if [ -f "$LOG" ]; then
|
||||||
|
rm $LOG
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
NO_LOG_PROCESSING=0
|
||||||
|
if [ $# -gt 2 ]; then
|
||||||
|
if [ $3 == "-keeplog" ]; then
|
||||||
|
NO_LOG_PROCESSING=1
|
||||||
|
else
|
||||||
|
echo "Usage: $0 <test> [logfile] [-keeplog]"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ">>>>>>> Starting test: $TEST <<<<<<<<"
|
echo ">>>>>>> Starting test: $TEST <<<<<<<<"
|
||||||
|
@ -32,6 +47,12 @@ if [ -f "$TEST.log" ]; then
|
||||||
OK=`grep "TEST OK" $TEST.log | wc -l`
|
OK=`grep "TEST OK" $TEST.log | wc -l`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $NO_LOG_PROCESSING -eq 1 ]; then
|
||||||
|
rm $LOG
|
||||||
|
mv $TEST.log $LOG
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $LOGFILE -eq 1 ]; then
|
if [ $LOGFILE -eq 1 ]; then
|
||||||
if [ $OK == 0 ]; then
|
if [ $OK == 0 ]; then
|
||||||
echo "FAIL" >> $LOG
|
echo "FAIL" >> $LOG
|
||||||
|
@ -57,6 +78,7 @@ fi
|
||||||
|
|
||||||
if [ $OK == 0 ]; then
|
if [ $OK == 0 ]; then
|
||||||
echo ">>>>>>> Finished test: $TEST FAILED <<<<<<<<"
|
echo ">>>>>>> Finished test: $TEST FAILED <<<<<<<<"
|
||||||
|
echo ""
|
||||||
else
|
else
|
||||||
echo ">>>>>>> Finished test: $TEST OK <<<<<<<<"
|
echo ">>>>>>> Finished test: $TEST OK <<<<<<<<"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue