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.
This commit is contained in:
parent
61bb4a933c
commit
f3a24fee60
@ -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
|
||||
|
15
test-ci.sh
Executable file
15
test-ci.sh
Executable file
@ -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
|
Loading…
Reference in New Issue
Block a user