From: Gianni Pucciani Date: Mon, 1 Sep 2008 12:10:25 +0000 (+0000) Subject: small fixes X-Git-Tag: myproxy-config-R_2_0_2_1~57 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=b34cdc30fc33bda3ac9a75c3c0aee9ec0d069026;p=jra1mw.git small fixes --- diff --git a/org.glite.testsuites.ctb/LB/lb-common.sh b/org.glite.testsuites.ctb/LB/lb-common.sh index 509c7ef..5e31f6b 100755 --- a/org.glite.testsuites.ctb/LB/lb-common.sh +++ b/org.glite.testsuites.ctb/LB/lb-common.sh @@ -74,12 +74,23 @@ function check_exec() return $TEST_ERROR fi # XXX: maybe use bash's command type? - local ret=`which $1` - if [ $? -eq 0 ] && [ -x $ret ]; then - return $TEST_OK - else - return $TEST_ERROR - fi + which $1 > /dev/null 2>&1 + if [ $? -eq 0 ]; then + local ret=`which $1` + if [ -x "$ret" ]; then + return $TEST_OK + else + return $TEST_ERROR + fi + else + return $TEST_ERROR + fi + +# if [ $? -eq 0 ] && [ -x "$ret" ]; then +# return $TEST_OK +# else +# return $TEST_ERROR +# fi } function check_binaries() 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 33942ed..e421c69 100755 --- a/org.glite.testsuites.ctb/LB/lb-test-logger-remote.sh +++ b/org.glite.testsuites.ctb/LB/lb-test-logger-remote.sh @@ -73,15 +73,20 @@ source ${COMMON} DEBUG=2 -## -# Starting the test -##################### +if [ -z "$SAME_SENSOR_HOME" ]; then + echo "SAME_SENSOR_HOME not set" + exit 2 +fi + +###################### +# Starting the test # +###################### { test_start # check_binaries -printf "Testing if all binaries are available" +printf "Testing if all binaries are available\n" check_binaries if [ $? -gt 0 ]; then test_failed @@ -90,7 +95,7 @@ else fi # ping_host: -printf "Testing ping to LB logger ${LB_HOST}" +printf "Testing ping to LB logger ${LB_HOST}\n" ping_host ${LB_HOST} if [ $? -gt 0 ]; then test_failed @@ -100,7 +105,7 @@ else fi # check_services -printf "Testing LB logger at ${LB_HOST}:${GLITE_LB_LOGGER_PORT} (logging)" +printf "Testing LB logger at ${LB_HOST}:${GLITE_LB_LOGGER_PORT} (logging)\n" check_socket ${LB_HOST} ${GLITE_LB_LOGGER_PORT} if [ $? -gt 0 ]; then test_failed