From: František Dvořák Date: Fri, 1 Apr 2011 15:10:57 +0000 (+0000) Subject: Fix harvester test, use mysql password from site-info.def if needed. X-Git-Tag: glite-lb-client_R_5_0_4_3~14 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=47a484b7ca467040b4f81889977d6ded1fb3701f;p=jra1mw.git Fix harvester test, use mysql password from site-info.def if needed. --- diff --git a/org.glite.lb.harvester/examples/test.sh b/org.glite.lb.harvester/examples/test.sh index 5ebe545..85c417c 100755 --- a/org.glite.lb.harvester/examples/test.sh +++ b/org.glite.lb.harvester/examples/test.sh @@ -70,7 +70,7 @@ init() { GLITE_LB_LOCATION_EXAMPLES="$dir/examples" if [ -d "$dir/examples" ]; then break; fi done - for dir in "$GLITE_LOCATION_ETC" "$GLITE_LOCATION/etc" "$GLITE_LOCATION/../etc" '/etc'; do + for dir in "$GLITE_LOCATION_ETC" "$GLITE_LB_LOCATION_ETC" "$GLITE_LOCATION/etc" '/etc'; do GLITE_LOCATION_ETC="$dir"; if [ -d "$dir" ]; then break; fi done @@ -188,8 +188,8 @@ EOF fi echo -n "OK psql." rm -f 'test.sql' - if [ -f "$GLITE_LOCATION/ETC/glite-lb/harvester-test-dbsetup.sql" ]; then - ln -s "$GLITE_LOCATION/ETC/glite-lb/harvester-test-dbsetup.sql" test.sql + if [ -f "$GLITE_LOCATION_ETC/glite-lb/harvester-test-dbsetup.sql" ]; then + ln -s "$GLITE_LOCATION_ETC/glite-lb/harvester-test-dbsetup.sql" test.sql else wget --quiet -O 'test.sql' 'http://jra1mw.cvs.cern.ch/cgi-bin/jra1mw.cgi/org.glite.lb.harvester/examples/test.sql?revision=HEAD' fi diff --git a/org.glite.testsuites.ctb/LB/tests/lb-test-harvester.sh b/org.glite.testsuites.ctb/LB/tests/lb-test-harvester.sh index 4993dd1..dd52c32 100755 --- a/org.glite.testsuites.ctb/LB/tests/lb-test-harvester.sh +++ b/org.glite.testsuites.ctb/LB/tests/lb-test-harvester.sh @@ -81,6 +81,9 @@ do source "site-info.def.tmp.$$" rm -f "site-info.def.tmp.$$" site=1 + if test -z "$GLITE_MYSQL_ROOT_PASSWORD"; then + export GLITE_MYSQL_ROOT_PASSWORD="$MYSQL_PASSWORD" + fi ;; *) showHelp && exit 2 ;; esac