summaryrefslogtreecommitdiffstats
path: root/autotest.sh
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2012-07-15 12:05:48 +0200
committerThomas Mueller <thomas.mueller@tmit.eu>2012-07-15 12:09:15 +0200
commitce40576881b2a0894f873ad40adb43187994b5a7 (patch)
treee7f788607691e0c804ad79b3c4873477e13e199f /autotest.sh
parenteba4f080159f0a97f82c79f8b57b6ce45ef127b5 (diff)
downloadnextcloud-server-ce40576881b2a0894f873ad40adb43187994b5a7.tar.gz
nextcloud-server-ce40576881b2a0894f873ad40adb43187994b5a7.zip
MySql testing added
Diffstat (limited to 'autotest.sh')
-rwxr-xr-xautotest.sh44
1 files changed, 42 insertions, 2 deletions
diff --git a/autotest.sh b/autotest.sh
index a9794db6982..06605687d1d 100755
--- a/autotest.sh
+++ b/autotest.sh
@@ -1,4 +1,6 @@
-#preparation
+#
+# sqlite testing now
+#
echo "Setup environment for sqlite testing ..."
DATADIR=data-autotest
rm -rf $DATADIR
@@ -25,8 +27,46 @@ echo 'Testing with sqlite ...'
cd tests
php -f index.php -- xml > autotest-results-sqlite.xml
+#
+# mysql testing now
+#
+# NOTES:
+# - grant access permissions: grant all on oc_autotest.* to 'oc_autotest'@'localhost';
+#
+echo "Setup environment for MySql testing ..."
+DATADIR=data-autotest
+rm -rf $DATADIR
+mkdir $DATADIR
+rm -rf config/config.php
+cat > ./config/autoconfig.php <<DELIM
+<?php
+\$AUTOCONFIG = array (
+ 'installed' => false,
+ 'dbtype' => 'mysql',
+ 'dbtableprefix' => 'oc_',
+ 'datadirectory' => 'data',
+ 'adminlogin' => 'admin',
+ 'adminpass' => 'admin',
+ 'directory' => '$PWD/$DATADIR',
+ 'dbuser' => 'oc_autotest',
+ 'dbname' => 'oc_autotest',
+ 'dbhost' => 'localhost',
+ 'dbpass' => 'owncloud',
+);
+DELIM
+
+#drop the database
+mysql -u oc_autotest -powncloud -e "DROP DATABASE oc_autotest"
+
+#setup
+php -f index.php
+
+#test execution
+echo 'Testing with MySql ...'
+cd tests
+php -f index.php -- xml > autotest-results-MySql.xml
#
-# TODO: create config for mysql and postgres
+# TODO: create config for postgres
#