Commit fe61ce06 authored by wangw's avatar wangw
Browse files

adjust order of checking SL5 and setting avariable

parent f7cf6a62
#!/bin/bash #!/bin/bash
echo "<h2>Test of FroNtier under CMSSW</h2>" echo "<h2>Test of FroNtier under CMSSW</h2>"
# Source the CMS environment # Source the CMS environment
echo "<h3>Sourcing the CMS environment</h3>" echo "<h3>Sourcing the CMS environment</h3>"
export SCRAM_ARCH=slc5_ia32_gcc434 if [ -n "$OSG_APP" ] ; then
export BUILD_ARCH=$SCRAM_ARCH
if [ -n "$VO_CMS_SW_DIR" ] ; then
SW_DIR=$VO_CMS_SW_DIR
elif [ -n "$OSG_APP" ] ; then
SW_DIR=$OSG_APP/cmssoft/cms SW_DIR=$OSG_APP/cmssoft/cms
elif [ -n "$VO_CMS_SW_DIR" ] ; then
SW_DIR=$VO_CMS_SW_DIR
else else
echo "ERROR: Neither VO_CMS_SW_DIR nor OSG_APP defined" echo "ERROR: Neither VO_CMS_SW_DIR nor OSG_APP defined"
exit $SAME_ERROR exit $SAME_ERROR
fi fi
echo "<pre>" if [ `uname -n|cut -d. -f2-` == "cern.ch" ] ; then
source $SW_DIR/cmsset_default.sh echo "running at CERN, hardset \$SW_DIR to /afs/cern.ch/cms/sw"
result=$? export SW_DIR=/afs/cern.ch/cms/sw/
echo "</pre>"
if [ $result != 0 ]
then
echo "ERROR: $SW_DIR/cmsset_default.sh non existent or non readable"
exit $SAME_ERROR
fi fi
# echo "CMS software location SW_DIR=" $SW_DIR
tmpfile=`mktemp /tmp/tmp.XXXXXXXXXX`
echo "<pre>"
# check for SL5 # check for SL5
#
libc25=1 libc25=1
if ! [ -f $SW_DIR/common/cmsos ] ; then if ! [ -f $SW_DIR/common/cmsos ] ; then
echo "$SW_DIR/common/cmsos not found - force to SL5" echo "$SW_DIR/common/cmsos not found - force to SL5"
...@@ -57,6 +52,29 @@ if [ $libc25 == "0" ] ; then ...@@ -57,6 +52,29 @@ if [ $libc25 == "0" ] ; then
fi fi
# this test requires SLC5 arch, currently
export SCRAM_ARCH=slc5_ia32_gcc434
export BUILD_ARCH=$SCRAM_ARCH
source $SW_DIR/cmsset_default.sh > $tmpfile 2>&1
result=$?
cat $tmpfile
echo "</pre>"
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"
# temporarely set this to WARNING to allow soft fail for SL4 clusters
exit $SAME_WARNING
fi
# Execute main test script # Execute main test script
echo "<h3>Executing the FroNtier test</h3>" echo "<h3>Executing the FroNtier test</h3>"
echo "<pre>" echo "<pre>"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment