From fc6f2ca033b8f5e6201558d091239c4a2ba93d83 Mon Sep 17 00:00:00 2001 From: Klas Lindfors Date: Wed, 27 Aug 2014 08:14:28 +0200 Subject: [PATCH] try to check if postgres is running on travis there seems to be issues where the postgres service isn't started when our tests are run, would this help? --- travis/selftest.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/travis/selftest.sh b/travis/selftest.sh index 6b8e007..8cf0c40 100755 --- a/travis/selftest.sh +++ b/travis/selftest.sh @@ -8,6 +8,10 @@ if [ "x$DB" = "xmysql" ]; then mysql -u $dbuser -e 'create database ykval;' mysql -u $dbuser ykval < ykval-db.sql elif [ "x$DB" = "xpgsql" ]; then + sudo service postgresql status + if [ $? != 0 ]; then + sudo service postgresql restart + fi dbuser=postgres psql -U $dbuser -c 'create database ykval;'