summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-09-22 09:13:51 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-09-22 09:13:51 +0200
commit2b45a67218edbdbe4e0a3745b345510a4f095a93 (patch)
treed9b3182811253ce1c1972a3246d680ba06dbdc76
parent2e0fbba37b130ffed5289785c34f43dabb62c466 (diff)
downloadnextcloud-server-2b45a67218edbdbe4e0a3745b345510a4f095a93.tar.gz
nextcloud-server-2b45a67218edbdbe4e0a3745b345510a4f095a93.zip
Fixing Jenkins execution for stable5
-rwxr-xr-xautotest.sh32
1 files changed, 18 insertions, 14 deletions
diff --git a/autotest.sh b/autotest.sh
index 141b4333f97..7d6d7d52aee 100755
--- a/autotest.sh
+++ b/autotest.sh
@@ -6,6 +6,10 @@
# @copyright 2012 Thomas Müller thomas.mueller@tmit.eu
#
+#$EXECUTOR_NUMBER is set by Jenkins and allows us to run autotest in parallel
+DATABASENAME=oc_autotest$EXECUTOR_NUMBER
+DATABASEUSER=oc_autotest$EXECUTOR_NUMBER
+ADMINLOGIN=admin$EXECUTOR_NUMBER
DATADIR=data-autotest
BASEDIR=$PWD
@@ -28,11 +32,11 @@ cat > ./tests/autoconfig-mysql.php <<DELIM
'installed' => false,
'dbtype' => 'mysql',
'dbtableprefix' => 'oc_',
- 'adminlogin' => 'admin',
+ 'adminlogin' => '$ADMINLOGIN',
'adminpass' => 'admin',
'directory' => '$BASEDIR/$DATADIR',
- 'dbuser' => 'oc_autotest',
- 'dbname' => 'oc_autotest',
+ 'dbuser' => '$DATABASEUSER',
+ 'dbname' => '$DATABASENAME',
'dbhost' => 'localhost',
'dbpass' => 'owncloud',
);
@@ -44,11 +48,11 @@ cat > ./tests/autoconfig-pgsql.php <<DELIM
'installed' => false,
'dbtype' => 'pgsql',
'dbtableprefix' => 'oc_',
- 'adminlogin' => 'admin',
+ 'adminlogin' => '$ADMINLOGIN',
'adminpass' => 'admin',
'directory' => '$BASEDIR/$DATADIR',
- 'dbuser' => 'oc_autotest',
- 'dbname' => 'oc_autotest',
+ 'dbuser' => '$DATABASEUSER',
+ 'dbname' => '$DATABASENAME',
'dbhost' => 'localhost',
'dbpass' => 'owncloud',
);
@@ -60,10 +64,10 @@ cat > ./tests/autoconfig-oci.php <<DELIM
'installed' => false,
'dbtype' => 'oci',
'dbtableprefix' => 'oc_',
- 'adminlogin' => 'admin',
+ 'adminlogin' => '$ADMINLOGIN',
'adminpass' => 'admin',
'directory' => '$BASEDIR/$DATADIR',
- 'dbuser' => 'oc_autotest',
+ 'dbuser' => '$DATABASEUSER',
'dbname' => 'XE',
'dbhost' => 'localhost',
'dbpass' => 'owncloud',
@@ -88,21 +92,21 @@ function execute_tests {
# drop database
if [ "$1" == "mysql" ] ; then
- mysql -u oc_autotest -powncloud -e "DROP DATABASE oc_autotest"
+ mysql -u $DATABASEUSER -powncloud -e "DROP DATABASE $DATABASENAME"
fi
if [ "$1" == "pgsql" ] ; then
- dropdb -U oc_autotest oc_autotest
+ dropdb -U $DATABASEUSER $DATABASENAME
fi
if [ "$1" == "oci" ] ; then
echo "drop the database"
sqlplus -s -l / as sysdba <<EOF
- drop user oc_autotest cascade;
+ drop user $DATABASENAME 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
+ create user $DATABASENAME identified by owncloud;
+ alter user $DATABASENAME default tablespace users
temporary tablespace temp
quota unlimited on users;
grant create session
@@ -113,7 +117,7 @@ EOF
, create view
, create synonym
, alter session
- to oc_autotest;
+ to $DATABASENAME;
exit;
EOF
fi