diff --git a/.travis.yml b/.travis.yml index 0865625..651a7bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,4 +18,4 @@ before_install: - docker run kylemanna/openvpn openssl version script: - - pushd tests && for i in *.sh; do echo -e "\n\n>> Running test $i\n\n"; "./$i"; done && popd + - ./test-ci.sh diff --git a/test-ci.sh b/test-ci.sh new file mode 100755 index 0000000..2b464c4 --- /dev/null +++ b/test-ci.sh @@ -0,0 +1,15 @@ +#!/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