From 7a3d87a4b2f44f3eca3600e71957265f376170b0 Mon Sep 17 00:00:00 2001 From: Lucas Bickel Date: Sat, 4 Mar 2017 09:48:25 +0100 Subject: [PATCH] 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). --- .travis.yml | 19 ++----------------- travis/php.sh | 9 +++++++++ travis/python.sh | 10 ++++++++++ 3 files changed, 21 insertions(+), 17 deletions(-) create mode 100755 travis/php.sh create mode 100755 travis/python.sh diff --git a/.travis.yml b/.travis.yml index 3fac6096a..1ff3e2f56 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/travis/php.sh b/travis/php.sh new file mode 100755 index 000000000..9c8c91b13 --- /dev/null +++ b/travis/php.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -xe + +[[ "$PYTHON" == true ]] && exit 0 + +pushd airtime_mvc/tests +../../vendor/bin/phpunit +popd diff --git a/travis/python.sh b/travis/python.sh new file mode 100755 index 000000000..2c61e0c3a --- /dev/null +++ b/travis/python.sh @@ -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