On 21/08/2010 00:51, Richard Mortimer wrote:
On 20/08/2010 00:56, Dan Langille wrote:
On 8/19/2010 11:29 AM, Richard Mortimer wrote:
Hi Dan,

On 17/08/2010 23:41, Dan Langille wrote:
Would you like to contribute to Bacula? The easiest way is running
regression testing. Run the tests on a daily basis and submit them to
the regression database.

I'll run tests on Ubuntu 10.04 (lucid) because I've got a suitable
installation available here. I had a quick try at following the
instructions but it didn't work. It is probably a setup problem on my
part so I'll try again tonight and will follow up on bacula-devel if I
still have problems.

I recommend following up here rather than devel.


I've got sqlite3 working and uploading results to the experimental area.
This worked ok first time.

I tried mysql yesterday (that's what I use for my own backups) and most
tests seem to fail with that. I suspect it is some database problem
because the setup scripts do not seem to be passed the username/password
from the regression test configuration. I'll have a look at what is
wrong when I get a few minutes over the next couple of days.

Ok as I suspected it is the database setup/cleanup scripts that are failing. Nothing is passing the username/password credentials to the appropriate scripts. I suspect it would work for a user regress with database regress and no db password.

In any case I have got it to work by dropping the mysql credentials into a file named regressmysql.cnf in the toplevel regress directory and then adding --defaults-file=${cwd}/regressmysql.cnf to the commands that cleanup/tear down the database. I've attached my current changes as a patch file but I'm sure that they need some work to make it suitable for committing to the git repo.

The regressmysql.cnf file is currently hand generated and contains

regr...@royalcounty:~/bacula/regress$ cat regressmysql.cnf
[client]
host     = localhost
user     = regress
password = passwordgoeshere

Regards

Richard


Regards

Richard
diff --git a/regress/scripts/cleanup b/regress/scripts/cleanup
index d63a52e..b1b14e0 100755
--- a/regress/scripts/cleanup
+++ b/regress/scripts/cleanup
@@ -22,8 +22,8 @@ if [ -d ${bin} ] ; then
      ${bin}/bacula stop 2>&1 >/dev/null
   fi
   cd ${scripts}
-  ./drop_bacula_tables      >/dev/null 2>&1
-  ./make_bacula_tables      >/dev/null 2>&1
+  ./drop_bacula_tables --defaults-file=${cwd}/regressmysql.cnf     >/dev/null 
2>&1
+  ./make_bacula_tables --defaults-file=${cwd}/regressmysql.cnf     >/dev/null 
2>&1
   ./grant_bacula_privileges >/dev/null 2>&1
   cd ${cwd}
 fi
diff --git a/regress/scripts/setup b/regress/scripts/setup
index 0a9311c..f80d9c5 100755
--- a/regress/scripts/setup
+++ b/regress/scripts/setup
@@ -71,10 +71,10 @@ bin/bacula stop
 mkdir -p working
 cd bin
 echo "Running database creation scripts"
-./create_bacula_database
-./drop_bacula_tables
-./make_bacula_tables
-./grant_bacula_privileges
+./create_bacula_database --defaults-file=${cwd}/regressmysql.cnf
+./drop_bacula_tables --defaults-file=${cwd}/regressmysql.cnf
+./make_bacula_tables --defaults-file=${cwd}/regressmysql.cnf
+./grant_bacula_privileges --defaults-file=${cwd}/regressmysql.cnf
 cd ${cwd}
 # Start and stop Bacula to ensure conf files are OK
 bin/bacula start
diff --git a/regress/tests/accurate-test b/regress/tests/accurate-test
index 21ae454..33280fd 100755
--- a/regress/tests/accurate-test
+++ b/regress/tests/accurate-test
@@ -283,9 +283,9 @@ p Check with bscan
 stop_bacula
 
 cd $bin
-  ./drop_bacula_tables      >/dev/null 2>&1
-  ./make_bacula_tables      >/dev/null 2>&1
-  ./grant_bacula_privileges >/dev/null 2>&1
+  ./drop_bacula_tables      --defaults-file=${cwd}/regressmysql.cnf >/dev/null 
2>&1
+  ./make_bacula_tables      --defaults-file=${cwd}/regressmysql.cnf >/dev/null 
2>&1
+  ./grant_bacula_privileges --defaults-file=${cwd}/regressmysql.cnf >/dev/null 
2>&1
 cd ..
 
 echo "volume=TestVolume001" >tmp/bscan.bsr
diff --git a/regress/tests/bscan-fast-tape b/regress/tests/bscan-fast-tape
index 7c68a78..ea4fb53 100755
--- a/regress/tests/bscan-fast-tape
+++ b/regress/tests/bscan-fast-tape
@@ -56,9 +56,9 @@ echo "End writing tape"
 # now drop and recreate the database
 #
 cd bin
-./drop_bacula_tables >/dev/null 2>&1
-./make_bacula_tables >/dev/null 2>&1
-./grant_bacula_privileges 2>&1 >/dev/null
+./drop_bacula_tables --defaults-file=${cwd}/regressmysql.cnf >/dev/null 2>&1
+./make_bacula_tables --defaults-file=${cwd}/regressmysql.cnf >/dev/null 2>&1
+./grant_bacula_privileges --defaults-file=${cwd}/regressmysql.cnf 2>&1 
>/dev/null
 cd ..
 
 echo "Begin attempt to read tape that crashes the system"
diff --git a/regress/tests/bscan-tape b/regress/tests/bscan-tape
index 419fd24..05127da 100755
--- a/regress/tests/bscan-tape
+++ b/regress/tests/bscan-tape
@@ -89,9 +89,9 @@ echo "Backup 4 done"
 # now drop and recreate the database
 #
 cd bin
-./drop_bacula_tables >/dev/null 2>&1
-./make_bacula_tables >/dev/null 2>&1
-./grant_bacula_privileges 2>&1 >/dev/null
+./drop_bacula_tables --defaults-file=${cwd}/regressmysql.cnf  >/dev/null 2>&1
+./make_bacula_tables --defaults-file=${cwd}/regressmysql.cnf  >/dev/null 2>&1
+./grant_bacula_privileges --defaults-file=${cwd}/regressmysql.cnf  2>&1 
>/dev/null
 cd ..
 
 echo "volume=TestVolume001" >tmp/bscan.bsr
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to