aboutsummaryrefslogtreecommitdiffstats
path: root/autotest.sh
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-06-23 10:48:20 +0200
committerMorris Jobke <hey@morrisjobke.de>2016-06-23 10:48:20 +0200
commit41436fecc29d2c4d46a4bd651a99de875c3d8a74 (patch)
tree580ed0fec827a9b562dbf840eebb7ba087221884 /autotest.sh
parent77c11758945f863e9bbf91a2e08952ea6999c237 (diff)
downloadnextcloud-server-41436fecc29d2c4d46a4bd651a99de875c3d8a74.tar.gz
nextcloud-server-41436fecc29d2c4d46a4bd651a99de875c3d8a74.zip
Add mysql job to CI
Diffstat (limited to 'autotest.sh')
-rwxr-xr-xautotest.sh16
1 files changed, 10 insertions, 6 deletions
diff --git a/autotest.sh b/autotest.sh
index 4dda2be43e5..b56394dc9df 100755
--- a/autotest.sh
+++ b/autotest.sh
@@ -200,12 +200,16 @@ function execute_tests {
echo "MySQL is up."
else
- if [ "mysql" != "$(mysql --version | grep -o mysql)" ] ; then
- echo "Your mysql binary is not provided by mysql"
- echo "To use the docker container set the USEDOCKER environment variable"
- exit -1
- fi
- mysql -u "$DATABASEUSER" -powncloud -e "DROP DATABASE IF EXISTS $DATABASENAME" -h $DATABASEHOST || true
+ if [ -z "$DRONE" ] ; then # no need to drop the DB when we are on CI
+ if [ "mysql" != "$(mysql --version | grep -o mysql)" ] ; then
+ echo "Your mysql binary is not provided by mysql"
+ echo "To use the docker container set the USEDOCKER environment variable"
+ exit -1
+ fi
+ mysql -u "$DATABASEUSER" -powncloud -e "DROP DATABASE IF EXISTS $DATABASENAME" -h $DATABASEHOST || true
+ else
+ DATABASEHOST=127.0.0.1
+ fi
fi
fi
if [ "$DB" == "mariadb" ] ; then