Run tests in small scripts

This is so we get a proper shell where running set -xe makes sense allowing travis to pick up nicely on how the tests run (ie. marking them as failed and not errored when the fail).
This commit is contained in:
Lucas Bickel 2017-03-04 09:48:25 +01:00
parent 9b3d0c90da
commit 7a3d87a4b2
3 changed files with 21 additions and 17 deletions

View File

@ -67,20 +67,5 @@ before_script:
- psql -c 'ALTER USER libretime CREATEDB;' -U postgres
- mkdir -p /tmp/log/libretime
script:
- >
if [[ "$PYTHON" == false ]]; then
pushd airtime_mvc/tests
../../vendor/bin/phpunit
results=$?
popd
exit $results
fi
- >
if [[ "$PYTHON" == true ]]; then
pushd python_apps/airtime_analyzer
nosetests -a '!rgain'
results=$?
echo "replaygain tests where skipped due to not having a reliable replaygain install on travis."
popd
exit $results
fi
- ./travis/php.sh
- ./travis/python.sh

9
travis/php.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
set -xe
[[ "$PYTHON" == true ]] && exit 0
pushd airtime_mvc/tests
../../vendor/bin/phpunit
popd

10
travis/python.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
set -xe
[[ "$PYTHON" == false ]] && exit 0
pushd python_apps/airtime_analyzer
nosetests -a '!rgain'
echo "replaygain tests where skipped due to not having a reliable replaygain install on travis."
popd