container-openvpn/test-ci.sh
Kyle Manna f3a24fee60 travis: Fail when a unit test fails
* Oops, this never actually aborted when something went wrong.
* Fix that and abort.
* Print a brief message about the last script run that blew up.
2016-06-01 13:36:31 -07:00

16 lines
257 B
Bash
Executable File

#!/bin/bash
set -x
cd "$(dirname "$(readlink -f "$0")")/tests"
for i in *.sh; do
echo -e "\n>> Running test $i\n"
./${i}
retval=$?
if [ $retval != 0 ]; then
echo "Failed $i with exit code $retval"
exit $retval
fi
done