[Pkg-owncloud-commits] [owncloud] 07/16: Fixing Jenkins execution for stable5

David Prévot taffit at moszumanska.debian.org
Wed Mar 11 15:49:30 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v5.0.19
in repository owncloud.

commit 2b45a67218edbdbe4e0a3745b345510a4f095a93
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date:   Mon Sep 22 09:13:51 2014 +0200

    Fixing Jenkins execution for stable5
---
 autotest.sh | 32 ++++++++++++++++++--------------
 1 file changed, 18 insertions(+), 14 deletions(-)

diff --git a/autotest.sh b/autotest.sh
index 141b433..7d6d7d5 100755
--- a/autotest.sh
+++ b/autotest.sh
@@ -6,6 +6,10 @@
 # @copyright 2012 Thomas Müller thomas.mueller at 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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list