#!/bin/bash echo "
" set -x uname -a date set +x echo "" # Source the CMS environment echo "
OSG Middleware
" if [ -d $OSG_APP/cmssoft/cms ] ;then SW_DIR=$OSG_APP/cmssoft/cms echo "Checking variable: \$OSG_APP/cmssoft/cms=$OSG_APP/cmssoft/cms
" elif [ -d $CVMFS/cms.cern.ch ] ; then SW_DIR=$CVMFS/cms.cern.ch echo "Checking variable: \$CVMFS/cms.cern.ch=$CVMFS/cms.cern.ch
" elif [ -d /cvmfs/cms.cern.ch ] ; then SW_DIR=/cvmfs/cms.cern.ch echo "Checking fallback location: /cvmfs/cms.cern.ch
" else echo "" echo "Cannot find CMS software area." echo "
" exit $SAME_ERROR fi elif [ -n "$VO_CMS_SW_DIR" ] ; then echo "gLite Middleware
" SW_DIR=$VO_CMS_SW_DIR else echo "ERROR: Neither VO_CMS_SW_DIR nor OSG_APP defined
" exit $SAME_ERROR fi tmpfile=`mktemp /tmp/tmp.XXXXXXXXXX` echo "" source $SW_DIR/cmsset_default.sh > $tmpfile 2>&1 result=$? #cat $tmpfile echo "" grep 'Your shell is not able to find' $tmpfile > /dev/null result2=$? rm -f $tmpfile if [ $result != 0 ] then echo "
ERROR: $SW_DIR/cmsset_default.sh non existent or non readable
" exit $SAME_ERROR fi if [ $result2 == 0 ] then echo "ERROR: $SW_DIR/cmsset_default.sh failed
" exit $SAME_ERROR fi # Execute main test script echo "" $SAME_SENSOR_HOME/tests/test_squid.py > squid.out 2>&1 result=$? cat squid.out echo "" exit $result