mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-25 13:31:37 +00:00
57 lines
1.3 KiB
Bash
57 lines
1.3 KiB
Bash
#!/bin/bash
|
|
|
|
echo "Setting environment"
|
|
export JAVAC=
|
|
export JAVA_HOME=~/jdk1.6.0_10
|
|
export PATH=~/apache-ant-1.7.0/bin:~/jdk1.6.0_10/bin:$PATH
|
|
|
|
|
|
rm -f *.log
|
|
LOG="TEST-`date '+%F'`.log"
|
|
touch $LOG
|
|
echo "Starting test run ($LOG)"
|
|
|
|
|
|
for myfile in ./*.csc
|
|
do
|
|
TEST=`basename $myfile .csc`
|
|
echo ">>>>>>> Starting test: $TEST <<<<<<<<"
|
|
|
|
java -jar ../dist/cooja.jar -nogui -test=$TEST
|
|
if [ -f "COOJA.log" ]; then
|
|
mv COOJA.log $TEST.cooja_log
|
|
fi
|
|
|
|
if [ -f "$TEST.log" ]; then
|
|
OK=`grep "TEST OK" $TEST.log | wc -l`
|
|
|
|
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 INFO END --" >> $LOG
|
|
echo "" >> $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 [ -f "$TEST.info" ]; then
|
|
echo "--LOG INFO START ($TEST.info) --" >> $LOG
|
|
cat $TEST.info >> $LOG
|
|
echo "-- TEST INFO END --" >> $LOG
|
|
echo "" >> $LOG
|
|
else
|
|
echo "-- NO TEST INFO AVAILABLE ($TEST.info) --" >> $LOG
|
|
fi
|
|
fi
|
|
|
|
echo "" >> $LOG
|
|
done
|