From d75fe0e81598010876d127edfbbb1dddc3d999a1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Fri, 25 Mar 2011 16:05:35 +0000 Subject: [PATCH] Update paths. --- org.glite.lb.harvester/examples/test.sh | 34 +++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/org.glite.lb.harvester/examples/test.sh b/org.glite.lb.harvester/examples/test.sh index b9130f1..5ebe545 100755 --- a/org.glite.lb.harvester/examples/test.sh +++ b/org.glite.lb.harvester/examples/test.sh @@ -36,8 +36,8 @@ cat <&1| \ + if [ -e "`which grid-proxy-info`" ] ; then + timeleft=`grid-proxy-info 2>&1| \ grep timeleft| sed 's/^.* //'` if [ "$timeleft" = "0:00:00" -o -z "$timeleft" ]; then echo "Proxy certificate check failed."\ @@ -88,7 +96,7 @@ init() { echo "Can't check proxy cert (grid-proxy-info not found). If you do not have valid proxy certificate, set GLITE_HOST_KEY/GLITE_HOST_KEY - otherwise tests will fail!" fi # fi - identity=`X509_USER_KEY=${X509_USER_KEY} X509_USER_CERT=${X509_USER_CERT} $GLOBUS_LOCATION/bin/grid-proxy-info 2>&1| \ + identity=`X509_USER_KEY=${X509_USER_KEY} X509_USER_CERT=${X509_USER_CERT} grid-proxy-info 2>&1| \ grep identity| sed 's/^[^/]*//'` if [ -z "$GLITE_LB_TEST_DB" ]; then @@ -118,11 +126,11 @@ init() { GLITE_RTM_TEST_PIDFILE=${GLITE_RTM_TEST_PIDFILE:-"/tmp/glite-rtm-test.pid"} GLITE_RTM_TEST_TTL=${GLITE_RTM_TEST_TTL:-"60"} - jobreg="$GLITE_LOCATION/examples/glite-lb-job_reg -m `hostname -f`:${GLITE_LB_TEST_SERVER_PORT} -s UserInterface" + jobreg="$GLITE_LB_LOCATION_EXAMPLES/glite-lb-job_reg -m `hostname -f`:${GLITE_LB_TEST_SERVER_PORT} -s UserInterface" logev="$GLITE_LOCATION/bin/glite-lb-logevent -x -S `pwd`/LB/proxy.sockstore.sock -U localhost" purge="$GLITE_LOCATION/bin/glite-lb-purge" [ -x "$purge" ] || purge="$GLITE_LOCATION/sbin/glite-lb-purge" - for dir in "$GLITE_LOCATION/examples" "`pwd`/../build" "`pwd`"; do + for dir in "$GLITE_LB_LOCATION_EXAMPLES" "`pwd`/../build" "`pwd`"; do if [ -x "$dir/glite-lb-harvester-dbg" ]; then rtm="$dir/glite-lb-harvester-dbg" fi @@ -162,7 +170,7 @@ create_db() { echo -n "." mysql $MYSQL_ARGS -e "GRANT ALL on $DB_NAME.* to $DB_USER@$DB_HOST" && \ echo -n "." - mysql -u $DB_USER $DB_NAME -h $DB_HOST < $GLITE_LOCATION/etc/glite-lb/glite-lb-dbsetup.sql || return $? + mysql -u $DB_USER $DB_NAME -h $DB_HOST < $GLITE_LOCATION_ETC/glite-lb/glite-lb-dbsetup.sql || return $? echo -n "." mkdir -p `pwd`/LB cat > `pwd`/LB/glite-lb-index.conf << EOF @@ -179,6 +187,12 @@ EOF cleanup_mysql || return $? 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 + 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 if [ "x$need_new_rtm_db" = "x1" ]; then dropdb $PG_ARGS "$RTM_NAME" >/dev/null 2>&1 echo -n "." -- 1.8.2.3