From 5d81f59e3a263123daf223c57f3c7cee72fa6b13 Mon Sep 17 00:00:00 2001 From: Kyle Johnson Date: Fri, 27 Jun 2014 08:00:49 -0400 Subject: [PATCH] Moved travis tests to their own script --- .travis.yml | 4 +--- utils/travis/run-tests.sh | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 utils/travis/run-tests.sh diff --git a/.travis.yml b/.travis.yml index fc6b442ed..2e49a5871 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/utils/travis/run-tests.sh b/utils/travis/run-tests.sh new file mode 100644 index 000000000..4dcc46e04 --- /dev/null +++ b/utils/travis/run-tests.sh @@ -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