summaryrefslogtreecommitdiffstats
path: root/autotest.sh
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2013-06-04 18:19:08 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2013-06-04 18:19:08 -0400
commitcb9fe475c4481993d2c95b040f7abb653f0971e7 (patch)
tree874e56e888745676fe815c3c8f75e2741ce275af /autotest.sh
parent9ead7c4776bd512c2a50ab917b99dcdc37e8db68 (diff)
parentc59ee99d932eb9a5d7df8fdfb6c318abfdef88b7 (diff)
downloadnextcloud-server-cb9fe475c4481993d2c95b040f7abb653f0971e7.tar.gz
nextcloud-server-cb9fe475c4481993d2c95b040f7abb653f0971e7.zip
Merge branch 'master' into hook-improvements
Conflicts: lib/files/view.php
Diffstat (limited to 'autotest.sh')
-rwxr-xr-xautotest.sh66
1 files changed, 61 insertions, 5 deletions
diff --git a/autotest.sh b/autotest.sh
index fdf6d2fe098..4562b3ed08a 100755
--- a/autotest.sh
+++ b/autotest.sh
@@ -54,6 +54,22 @@ cat > ./tests/autoconfig-pgsql.php <<DELIM
);
DELIM
+cat > ./tests/autoconfig-oci.php <<DELIM
+<?php
+\$AUTOCONFIG = array (
+ 'installed' => false,
+ 'dbtype' => 'oci',
+ 'dbtableprefix' => 'oc_',
+ 'adminlogin' => 'admin',
+ 'adminpass' => 'admin',
+ 'directory' => '$BASEDIR/$DATADIR',
+ 'dbuser' => 'oc_autotest',
+ 'dbname' => 'XE',
+ 'dbhost' => 'localhost',
+ 'dbpass' => 'owncloud',
+);
+DELIM
+
function execute_tests {
echo "Setup environment for $1 testing ..."
# back to root folder
@@ -77,6 +93,30 @@ function execute_tests {
if [ "$1" == "pgsql" ] ; then
dropdb -U oc_autotest oc_autotest
fi
+ if [ "$1" == "oci" ] ; then
+ echo "drop the database"
+ sqlplus -s -l / as sysdba <<EOF
+ drop user oc_autotest cascade;
+EOF
+
+ echo "create the database"
+ sqlplus -s -l / as sysdba <<EOF
+ create user oc_autotest identified by owncloud;
+ alter user oc_autotest default tablespace users
+ temporary tablespace temp
+ quota unlimited on users;
+ grant create session
+ , create table
+ , create procedure
+ , create sequence
+ , create trigger
+ , create view
+ , create synonym
+ , alter session
+ to oc_autotest;
+ exit;
+EOF
+ fi
# copy autoconfig
cp $BASEDIR/tests/autoconfig-$1.php $BASEDIR/config/autoconfig.php
@@ -90,15 +130,27 @@ function execute_tests {
rm -rf coverage-html-$1
mkdir coverage-html-$1
php -f enable_all.php
- phpunit --configuration phpunit-autotest.xml --log-junit autotest-results-$1.xml --coverage-clover autotest-clover-$1.xml --coverage-html coverage-html-$1
+ if [ "$1" == "sqlite" ] ; then
+ # coverage only with sqlite - causes segfault on ci.tmit.eu - reason unknown
+ phpunit --configuration phpunit-autotest.xml --log-junit autotest-results-$1.xml --coverage-clover autotest-clover-$1.xml --coverage-html coverage-html-$1
+ else
+ phpunit --configuration phpunit-autotest.xml --log-junit autotest-results-$1.xml
+ fi
}
#
# start test execution
#
-execute_tests "sqlite"
-execute_tests 'mysql'
-execute_tests 'pgsql'
+if [ -z "$1" ]
+ then
+ execute_tests "sqlite"
+ execute_tests 'mysql'
+ execute_tests 'pgsql'
+ # we will add oci as soon as it's stable
+ #execute_tests 'oci'
+else
+ execute_tests $1
+fi
#
# NOTES on mysql:
@@ -111,4 +163,8 @@ execute_tests 'pgsql'
# - to enable dropdb I decided to add following line to pg_hba.conf (this is not the safest way but I don't care for the testing machine):
# local all all trust
#
-
+# NOTES on oci:
+# - it's a pure nightmare to install Oracle on a Linux-System
+# - DON'T TRY THIS AT HOME!
+# - if you really need it: we feel sorry for you
+#