From 87115b9d95360b119e9774c613a50ab08702f81d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Posp=C3=AD=C5=A1il?= Date: Mon, 1 Sep 2008 12:46:08 +0000 Subject: [PATCH] source the lb-common at the beginning --- org.glite.testsuites.ctb/LB/lb-common.sh | 4 +++- .../LB/lb-test-logger-remote.sh | 27 +++++++++------------- .../LB/lb-test-server-remote.sh | 16 ++++++------- 3 files changed, 22 insertions(+), 25 deletions(-) diff --git a/org.glite.testsuites.ctb/LB/lb-common.sh b/org.glite.testsuites.ctb/LB/lb-common.sh index 5e31f6b..da56a58 100755 --- a/org.glite.testsuites.ctb/LB/lb-common.sh +++ b/org.glite.testsuites.ctb/LB/lb-common.sh @@ -14,10 +14,12 @@ if [ ! -r ${TEST_COMMON} ]; then printf "Common definitions '${TEST_COMMON}' not found!\n" exit 2 fi -. ${TEST_COMMON} +source ${TEST_COMMON} + # define variables GLITE_LOCATION=${GLITE_LOCATION:-/opt/glite} +SAME_SENSOR_HOME=${SAME_SENSOR_HOME:-.} PATH=$GLITE_LOCATION/bin:$GLITE_LOCATION/examples:$PATH export PATH diff --git a/org.glite.testsuites.ctb/LB/lb-test-logger-remote.sh b/org.glite.testsuites.ctb/LB/lb-test-logger-remote.sh index e421c69..39c6383 100755 --- a/org.glite.testsuites.ctb/LB/lb-test-logger-remote.sh +++ b/org.glite.testsuites.ctb/LB/lb-test-logger-remote.sh @@ -41,6 +41,14 @@ if [ -z "$1" ]; then exit 2 fi +# read common definitions and functions +COMMON=lb-common.sh +if [ ! -r ${COMMON} ]; then + printf "Common definitions '${COMMON}' missing!" + exit 2 +fi +source ${COMMON} + logfile=$$.tmp flag=0 while test -n "$1" @@ -63,21 +71,8 @@ if [ ! -w $logfile ]; then exit $TEST_ERROR fi -# read common definitions and functions -COMMON=lb-common.sh -if [ ! -r ${COMMON} ]; then - printf "Common definitions '${COMMON}' missing!" - exit 2 -fi -source ${COMMON} - DEBUG=2 -if [ -z "$SAME_SENSOR_HOME" ]; then - echo "SAME_SENSOR_HOME not set" - exit 2 -fi - ###################### # Starting the test # ###################### @@ -86,7 +81,7 @@ fi test_start # check_binaries -printf "Testing if all binaries are available\n" +printf "Testing if all binaries are available" check_binaries if [ $? -gt 0 ]; then test_failed @@ -95,7 +90,7 @@ else fi # ping_host: -printf "Testing ping to LB logger ${LB_HOST}\n" +printf "Testing ping to LB logger ${LB_HOST}" ping_host ${LB_HOST} if [ $? -gt 0 ]; then test_failed @@ -105,7 +100,7 @@ else fi # check_services -printf "Testing LB logger at ${LB_HOST}:${GLITE_LB_LOGGER_PORT} (logging)\n" +printf "Testing LB logger at ${LB_HOST}:${GLITE_LB_LOGGER_PORT} (logging)" check_socket ${LB_HOST} ${GLITE_LB_LOGGER_PORT} if [ $? -gt 0 ]; then test_failed diff --git a/org.glite.testsuites.ctb/LB/lb-test-server-remote.sh b/org.glite.testsuites.ctb/LB/lb-test-server-remote.sh index 7c1b6b2..a18a3dc 100755 --- a/org.glite.testsuites.ctb/LB/lb-test-server-remote.sh +++ b/org.glite.testsuites.ctb/LB/lb-test-server-remote.sh @@ -42,6 +42,14 @@ if [ -z "$1" ]; then exit 2 fi +# read common definitions and functions +COMMON=lb-common.sh +if [ ! -r ${COMMON} ]; then + printf "Common definitions '${COMMON}' missing!" + exit 2 +fi +source ${COMMON} + logfile=$$.tmp flag=0 while test -n "$1" @@ -64,14 +72,6 @@ if [ ! -w $logfile ]; then exit $TEST_ERROR fi -# read common definitions and functions -COMMON=lb-common.sh -if [ ! -r ${COMMON} ]; then - printf "Common definitions '${COMMON}' missing!" - exit 2 -fi -source ${COMMON} - DEBUG=2 ## -- 1.8.2.3