summaryrefslogtreecommitdiffstats
path: root/autotest.sh
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-06-30 09:06:19 +0200
committerGitHub <noreply@github.com>2016-06-30 09:06:19 +0200
commit3acdc1339d0d7b04357bc05013a0f13521792961 (patch)
tree00ec686ded1b86a19dd8212792b4509920dd46fa /autotest.sh
parent83a046a0fb2d35267ff6866d431b77f053ef8947 (diff)
parent01829e8d7cf42b54308046e10a62babe39111ea6 (diff)
downloadnextcloud-server-3acdc1339d0d7b04357bc05013a0f13521792961.tar.gz
nextcloud-server-3acdc1339d0d7b04357bc05013a0f13521792961.zip
Merge pull request #206 from nextcloud/ci-mysql
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 f237f8aa11a..5f5633fcf0f 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