- use not colision variable names
authorJiří Škrábal <nykolas@ics.muni.cz>
Mon, 8 Aug 2005 08:56:59 +0000 (08:56 +0000)
committerJiří Škrábal <nykolas@ics.muni.cz>
Mon, 8 Aug 2005 08:56:59 +0000 (08:56 +0000)
org.glite.lb.proxy/examples/test.sh

index ae67036..4822ba5 100755 (executable)
@@ -15,8 +15,8 @@ PURGE=${PURGE:-glite-lb-purge}
 
 # -m host
 BKSERVER_HOST=${BKSERVER_HOST:-`hostname -f`:9000}
-LBPROXY_STORE_SOCK=${EDG_WL_LBPROXY_STORE_SOCK:-/tmp/lb_proxy_store.sock}
-LBPROXY_SERVE_SOCK=${EDG_WL_LBPROXY_SERVE_SOCK:-/tmp/lb_proxy_serve.sock}
+TEST_LBPROXY_STORE_SOCK=${EDG_WL_LBPROXY_STORE_SOCK:-/tmp/lb_proxy_store.sock}
+TEST_LBPROXY_SERVE_SOCK=${EDG_WL_LBPROXY_SERVE_SOCK:-/tmp/lb_proxy_serve.sock}
 
 STATES="aborted cancelled done ready running scheduled waiting"
 LBPROXY_PURGE_STATES="cleared done aborted cancelled"
@@ -133,7 +133,7 @@ test_gen_sample_jobs()
                SAMPLE_JOBS_ARRAY[$job]=$EDG_JOBID
 
                state=`$JOBSTAT $EDG_JOBID 2>&1 | grep "state :" | cut -d " " -f 3 | tr A-Z a-z`
-               proxy_state=`$JOBSTAT -x $LBPROXY_SERVE_SOCK $EDG_JOBID 2>&1 | grep "state :" | cut -d " " -f 3 | tr A-Z a-z`
+               proxy_state=`$JOBSTAT -x $TEST_LBPROXY_SERVE_SOCK $EDG_JOBID 2>&1 | grep "state :" | cut -d " " -f 3 | tr A-Z a-z`
                if test "$state" != "submitted" ; then
                        echo -e "ERROR\n\tjob ${SAMPLE_JOBS_ARRAY[$job]} not submitted succesfully!"
                        exit 1;
@@ -169,9 +169,9 @@ test_logging_events()
                tmp=`echo $RANDOM % $st_count + 1 | bc`
                state=`echo $STATES | cut -d " " -f $tmp | tr A-Z a-z`
 
-               source glite-lb-$state.sh -X $LBPROXY_STORE_SOCK -m $BKSERVER_HOST -j ${SAMPLE_JOBS_ARRAY[$job]} 2>&1 1>/dev/null
+               source glite-lb-$state.sh -X $TEST_LBPROXY_STORE_SOCK -m $BKSERVER_HOST -j ${SAMPLE_JOBS_ARRAY[$job]} 2>&1 1>/dev/null
                [ $? -ne 0 ] && echo -e "ERROR\n\tglite-lb-$state.sh ${SAMPLE_JOBS_ARRAY[$job]} error!"
-               proxy_state=`$JOBSTAT -x $LBPROXY_SERVE_SOCK ${SAMPLE_JOBS_ARRAY[$job]} 2>&1 | grep "state :" | cut -d " " -f 3 | tr A-Z a-z`
+               proxy_state=`$JOBSTAT -x $TEST_LBPROXY_SERVE_SOCK ${SAMPLE_JOBS_ARRAY[$job]} 2>&1 | grep "state :" | cut -d " " -f 3 | tr A-Z a-z`
                purged=`echo $LBPROXY_PURGE_STATES | grep $state`
                bkserver_state=`$JOBSTAT ${SAMPLE_JOBS_ARRAY[$job]} 2>&1 | grep "state :" | cut -d " " -f 3 | tr A-Z a-z`
 
@@ -229,8 +229,8 @@ do
        "-h" | "--help") show_help && exit 0 ;;
        "-x" | "--proxy-sockpath-pref")
                shift
-               export LBPROXY_STORE_SOCK=$1store.sock
-               export LBPROXY_SERVE_SOCK=$1serve.sock
+               export TEST_LBPROXY_STORE_SOCK=$1store.sock
+               export TEST_LBPROXY_SERVE_SOCK=$1serve.sock
                ;;
        "-m" | "--bkserver") shift ; BKSERVER_HOST=$1 ;;
        "-j" | "--jobs-count") shift; JOBS_ARRAY_SIZE=$1 ;;