Add unit-tests automation to Drone CI

This commit is contained in:
Andrey Volk committed 2019-11-22 00:15:40 +04:00
1 parent 724868fa08
commit 0bd676db32
3 files changed
+97

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
#!/bin/bash
TESTS=$(make -f - 2>/dev/null <<EOF
include Makefile
all:
@echo \$(TESTS)
EOF
)
echo "-----------------------------------------------------------------";
echo "Starting tests";
echo "Tests found: ${TESTS}";
echo "-----------------------------------------------------------------";
for i in $TESTS
do
echo "Testing $i" ;
logfilename="log_run-tests_$i.html";
./$i | tee >(ansi2html > $logfilename) ;
exitstatus=${PIPESTATUS[0]} ;
if [ "0" -eq $exitstatus ] ; then
rm $logfilename ;
else
echo "*** ./$i exit status is $exitstatus" ;
echo "*** $logfilename was saved" ;
fi ;
echo "----------------" ;
done