Fix harvester test, use mysql password from site-info.def if needed.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Fri, 1 Apr 2011 15:10:57 +0000 (15:10 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Fri, 1 Apr 2011 15:10:57 +0000 (15:10 +0000)
org.glite.lb.harvester/examples/test.sh
org.glite.testsuites.ctb/LB/tests/lb-test-harvester.sh

index 5ebe545..85c417c 100755 (executable)
@@ -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
index 4993dd1..dd52c32 100755 (executable)
@@ -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