freeswitch/tests/unit/run-tests.sh

28 lines
653 B
Bash
Raw Normal View History

2019-11-21 13:43:28 -05:00
#!/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