From 47a484b7ca467040b4f81889977d6ded1fb3701f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Fri, 1 Apr 2011 15:10:57 +0000 Subject: [PATCH] Fix harvester test, use mysql password from site-info.def if needed. --- org.glite.lb.harvester/examples/test.sh | 6 +++--- org.glite.testsuites.ctb/LB/tests/lb-test-harvester.sh | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) 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 -- 1.8.2.3