Moved travis tests to their own script

This commit is contained in:
Kyle Johnson 2014-06-27 08:00:49 -04:00
parent 1ff907ae80
commit 5d81f59e3a
2 changed files with 19 additions and 3 deletions

View File

@ -24,6 +24,4 @@ before_script:
- bash $TRAVIS_BUILD_DIR/utils/travis/bootstrap-zm.sh
script:
- bash $TRAVIS_BUILD_DIR/utils/travis/build-zm.sh
- mysql -uzmuser -pzmpass zm < db/test.monitor.sql
- sudo zmpkg.pl start
- sudo zmfilter.pl -f purgewhenfull
- bash $TRAVIS_BUILD_DIR/utils/travis/run-tests.sh

18
utils/travis/run-tests.sh Normal file
View File

@ -0,0 +1,18 @@
#!/bin/bash
set -e
set -o pipefail
with_timestamps() {
while read -r line; do
echo -e "$(date +%T)\t$line";
done
}
run_tests() {
mysql -uzmuser -pzmpass zm < db/test.monitor.sql
sudo zmpkg.pl start
sudo zmfilter.pl -f purgewhenfull
}
run_tests | with_timestamps