Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-07-09 14:52:40 +0400
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-07-09 14:53:10 +0400
commitf773b91365b77e97477117faabcb2081ab617ab4 (patch)
treea4f1318ef90e58bbf2313de0bafea8c68572fad4 /autotest.sh
parentf8ba6c77c8516baf80f9c1b68545d16d6f2a032a (diff)
enable oci in autotest.sh
Diffstat (limited to 'autotest.sh')
-rwxr-xr-xautotest.sh65
1 files changed, 60 insertions, 5 deletions
diff --git a/autotest.sh b/autotest.sh
index fdf6d2fe098..141b4333f97 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,26 @@ 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 $2 $3
+ else
+ phpunit --configuration phpunit-autotest.xml --log-junit autotest-results-$1.xml $2 $3
+ 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'
+ execute_tests 'oci'
+else
+ execute_tests $1 $2 $3
+fi
#
# NOTES on mysql:
@@ -111,4 +162,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
+#