source the lb-common at the beginning
authorJan Pospíšil <honik@ntc.zcu.cz>
Mon, 1 Sep 2008 12:46:08 +0000 (12:46 +0000)
committerJan Pospíšil <honik@ntc.zcu.cz>
Mon, 1 Sep 2008 12:46:08 +0000 (12:46 +0000)
org.glite.testsuites.ctb/LB/lb-common.sh
org.glite.testsuites.ctb/LB/lb-test-logger-remote.sh
org.glite.testsuites.ctb/LB/lb-test-server-remote.sh

index 5e31f6b..da56a58 100755 (executable)
@@ -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
 
index e421c69..39c6383 100755 (executable)
@@ -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
index 7c1b6b2..a18a3dc 100755 (executable)
@@ -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
 
 ##