CE-cms-frontier 1.08 KB
Newer Older
1
2
#!/bin/bash

Andrea Sciaba's avatar
Andrea Sciaba committed
3
# Source the CMS environment
Andrea Sciaba's avatar
Andrea Sciaba committed
4
5
6
7
8
9
10
11
12
if [ -n "$OSG_GRID" ] ; then
    [ -f $OSG_GRID/setup.sh ] && source $OSG_GRID/setup.sh
    if [ -d $OSG_APP/cmssoft/cms ] ;then
         SW_DIR=$OSG_APP/cmssoft/cms
    elif [ -d $CVMFS/cms.cern.ch ] ; then
         SW_DIR=$CVMFS/cms.cern.ch
    elif [ -d /cvmfs/cms.cern.ch ] ; then
         SW_DIR=/cvmfs/cms.cern.ch
    else
13
14
15
	echo "ERROR: Cannot find CMS software in OSG node"
	echo "summary: SW_DIR_UNDEF"
	exit $SAME_ERROR
Andrea Sciaba's avatar
Andrea Sciaba committed
16
    fi
17
18
elif [ -n "$VO_CMS_SW_DIR" ] ; then
    SW_DIR=$VO_CMS_SW_DIR
Andrea Sciaba's avatar
Andrea Sciaba committed
19
else
20
    SW_DIR=/cvmfs/cms.cern.ch
Andrea Sciaba's avatar
Andrea Sciaba committed
21
fi
Andrea Sciaba's avatar
Andrea Sciaba committed
22

23
24
25
26
tmpfile=`mktemp /tmp/tmp.XXXXXXXXXX`

source $SW_DIR/cmsset_default.sh > $tmpfile 2>&1
result=$?
27
export BUILD_ARCH=$SCRAM_ARCH
28
29
30
grep 'Your shell is not able to find' $tmpfile > /dev/null
result2=$?
rm -f $tmpfile
31
32
33
34
35
if [ $result != 0 -o $result2 == 0 ] ; then
    cat $tmpfile
    rm -f $tmpfile
    echo "ERROR: CMS software initialisation script cmsset_default.sh failed"
    echo "summary: NO_SETUP_SCRIPT"
36
37
38
    exit $SAME_ERROR
fi

39
40
41
42
# Execute main test script
$SAME_SENSOR_HOME/tests/CMSSW_frontier.sh 2>&1
result=$?
exit $result