ulimit -c unlimited
# define variables
-GLITE_LB_LOCATION=${GLITE_LB_LOCATION:-/opt/glite}
-GLITE_LOCATION=${GLITE_LB_LOCATION}
+GLITE_LB_LOCATION=${GLITE_LB_LOCATION:-$GLITE_LOCATION}
+GLITE_LOCATION=${GLITE_LOCATION:-'/opt/glite'}
SAME_SENSOR_HOME=${SAME_SENSOR_HOME:-.}
-PATH=$GLITE_LOCATION/bin:$GLITE_LOCATION/examples:$PATH
-for libdir in lib lib64; do
- examples="$GLITE_LOCATION/$libdir/glite-lb/examples"
- if test -d "$examples"; then
- PATH="$examples:$PATH"
- fi
+for dir in $GLITE_LOCATION $GLITE_LOCATION/lib64/glite-lb $GLITE_LOCATION/lib/glite-lb; do
+ if test -d "$dir/examples"; then PATH="$examples:$PATH"; fi
done
+PATH="$GLITE_LOCATION/bin:$PATH"
export PATH
# LB binaries
GLITE_RTM_TEST_ADDITIONAL_ARGS ... L&B harvester additional arguments
(--old required for L&B < 2.0)
- For full list of the possible environment variables, see '\$GLITE_LOCATION/examples/glite-lb-harvester.sh --help'.
+ For full list of the possible environment variables, see '`which glite-lb-harvester.sh` --help'.
Tests called (glite-lb-harvester.sh script):
test_skipped
fi
+printf "L&B harvester test script in PATH"
+if which glite-lb-harvester-test.sh >/dev/null 2>&1; then
+ test_done
+else
+ test_failed
+ print_error "glite-lb-harvester-test.sh not found"
+ exit 2
+fi
##
# ==== L&B harvester test ====
##
-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
-
printf "Launching the L&B harvester test..."
print_newline
if [ -n "$is_html" ]; then
else
local_amp='&'
fi
-$GLITE_LOCATION/examples/glite-lb-harvester-test.sh stop
-$GLITE_LOCATION/examples/glite-lb-harvester-test.sh 2>&1 | sed "s,&,$local_amp,"
-err=$?
+glite-lb-harvester-test.sh stop
+(glite-lb-harvester-test.sh 2>&1; echo $? > res.$$.txt) | sed "s,&,$local_amp,"
+err=`cat res.$$.txt`; rm -f res.$$.txt
if [ -n "$is_html" ]; then
printf "</pre>"
fi
-if [ $err = 0 ]; then
+if [ "$err" = "0" ]; then
test_done
else
test_failed