CI script tests: more homogeneous logs
This commit is contained in:
parent
53dd64a8c8
commit
2c1a739984
@ -46,14 +46,9 @@ rm COOJA.log
|
||||
if [ $STATUS -eq 0 ] && [ $HOPS -eq $TARGETHOPS ] ; then
|
||||
printf "%-32s TEST OK\n" "$BASENAME" | tee $BASENAME.testlog;
|
||||
else
|
||||
# Verbose output when using CI
|
||||
if [ "$CI" = "true" ]; then
|
||||
echo "==== $BASENAME.coojalog ====" ; cat $BASENAME.coojalog;
|
||||
echo "==== $BASENAME.tunslip.log ====" ; cat $BASENAME.tunslip.log;
|
||||
echo "==== $BASENAME.scriptlog ====" ; cat $BASENAME.scriptlog;
|
||||
else
|
||||
echo "==== Check $BASENAME.coojalog, $BASENAME.tunslip.log, and $BASENAME.scriptlog for details ====";
|
||||
fi;
|
||||
echo "==== $BASENAME.coojalog ====" ; cat $BASENAME.coojalog;
|
||||
echo "==== $BASENAME.tunslip.log ====" ; cat $BASENAME.tunslip.log;
|
||||
echo "==== $BASENAME.scriptlog ====" ; cat $BASENAME.scriptlog;
|
||||
|
||||
printf "%-32s TEST FAIL\n" "$BASENAME" | tee $BASENAME.testlog;
|
||||
fi
|
||||
|
@ -43,14 +43,9 @@ rm COOJA.log
|
||||
if [ $STATUS -eq 0 ] ; then
|
||||
printf "%-32s TEST OK\n" "$BASENAME" | tee $BASENAME.testlog;
|
||||
else
|
||||
# Verbose output when using CI
|
||||
if [ "$CI" = "true" ]; then
|
||||
echo "==== $BASENAME.coojalog ====" ; cat $BASENAME.coojalog;
|
||||
echo "==== $BASENAME.tunslip.log ====" ; cat $BASENAME.tunslip.log;
|
||||
echo "==== $BASENAME.scriptlog ====" ; cat $BASENAME.scriptlog;
|
||||
else
|
||||
echo "==== Check $BASENAME.coojalog, $BASENAME.tunslip.log, and $BASENAME.scriptlog for details ====";
|
||||
fi;
|
||||
echo "==== $BASENAME.coojalog ====" ; cat $BASENAME.coojalog;
|
||||
echo "==== $BASENAME.tunslip.log ====" ; cat $BASENAME.tunslip.log;
|
||||
echo "==== $BASENAME.scriptlog ====" ; cat $BASENAME.scriptlog;
|
||||
|
||||
printf "%-32s TEST FAIL\n" "$BASENAME" | tee $BASENAME.testlog;
|
||||
fi
|
||||
|
@ -29,28 +29,15 @@ pgrep hello-world | sudo xargs kill -9
|
||||
|
||||
if [ $STATUS -eq 0 ] ; then
|
||||
cp $BASENAME.log $BASENAME.testlog
|
||||
printf "%-32s TEST OK\n" "$BASENAME" | tee -a $BASENAME.testlog;
|
||||
printf "%-32s TEST OK\n" "$BASENAME" | tee $BASENAME.testlog;
|
||||
else
|
||||
mv $BASENAME.log $BASENAME.faillog
|
||||
echo "==== make.log ====" ; cat make.log;
|
||||
echo "==== make.err ====" ; cat make.err;
|
||||
echo "==== node.log ====" ; cat node.log;
|
||||
echo "==== node.err ====" ; cat node.err;
|
||||
echo "==== $BASENAME.log ====" ; cat $BASENAME.log;
|
||||
|
||||
echo ""
|
||||
echo "---- make.log"
|
||||
cat make.log
|
||||
|
||||
echo ""
|
||||
echo "---- make.err"
|
||||
cat make.err
|
||||
|
||||
echo ""
|
||||
echo "---- node.log"
|
||||
cat node.log
|
||||
|
||||
echo ""
|
||||
echo "---- node.err"
|
||||
cat node.err
|
||||
|
||||
cp $BASENAME.log $BASENAME.faillog
|
||||
printf "%-32s TEST FAIL\n" "$BASENAME" | tee -a $BASENAME.testlog;
|
||||
printf "%-32s TEST FAIL\n" "$BASENAME" | tee $BASENAME.testlog;
|
||||
fi
|
||||
|
||||
rm make.log
|
||||
|
@ -3,16 +3,12 @@ TESTLOGS=$(sort $(patsubst %.sh,%.testlog,$(TESTS)))
|
||||
|
||||
CONTIKI=../..
|
||||
|
||||
tests: $(TESTLOGS)
|
||||
all: clean summary
|
||||
|
||||
summary: clean tests
|
||||
ifeq ($(TESTS),)
|
||||
@echo No tests > $@
|
||||
else
|
||||
@cat $(TESTLOGS) > $@
|
||||
endif
|
||||
|
||||
all: cooja clean tests
|
||||
summary: cooja $(TESTLOGS)
|
||||
@cat *.testlog > summary
|
||||
@echo "========== Summary =========="
|
||||
@cat summary
|
||||
|
||||
%.testlog: %.sh cooja
|
||||
@bash "$(basename $@).sh" "$(CONTIKI)"
|
||||
|
Loading…
Reference in New Issue
Block a user