Commit 02bd405d authored by Andrea Sciaba's avatar Andrea Sciaba
Browse files

HTML-compliant output

parent edb58051
......@@ -16,8 +16,9 @@ date --utc
voms-proxy-info -identity -fqan
id
set +x
echo "</pre>"
echo "<h2><a name="Analysis Test"></a>Analysis Test</h2>"
echo "<h2><a name=\"AnalysisTest\"></a>Analysis Test</h2>"
# Source the CMS environment
echo "<h3>Sourcing the CMS environment</h3>"
......@@ -26,19 +27,18 @@ if [ -n "$OSG_APP" ] ; then
elif [ -n "$VO_CMS_SW_DIR" ] ; then
SW_DIR=$VO_CMS_SW_DIR
else
echo "ERROR: Neither VO_CMS_SW_DIR nor OSG_APP defined"
echo "<p>ERROR: Neither VO_CMS_SW_DIR nor OSG_APP defined</p>"
exit $SAME_ERROR
fi
echo "<pre>"
echo "CMS software location SW_DIR=" $SW_DIR
tmpfile=`mktemp /tmp/tmp.XXXXXXXXXX`
echo "<pre>"
# check for SL5
libc25=1
if ! [ -f $SW_DIR/common/cmsos ] ; then
echo "$SW_DIR/common/cmsos not found - force to SL5"
echo "</pre><p>$SW_DIR/common/cmsos not found - force to SL5</p><pre>"
slVersion="slc5"
else
osVersion=`$SW_DIR/common/cmsos`
......@@ -48,20 +48,23 @@ else
slVersion=`echo $cmsarch|cut -d'_' -f1`
fi
echo "slVersion=" $slVersion
echo "</pre>"
if ! [ -f /lib/libc-2.5.so ] ; then
echo "libc 2.5 not found, not an SL5 node"
echo "<p>libc 2.5 not found, not an SL5 node</p>"
libc25=0
fi
if ! [ $slVersion == "slc5" ] ; then
echo "<h3> not an SL5 machine </h3>"
echo "<p>not an SL5 machine</p>"
exit $SAME_WARNING
fi
if [ $libc25 == "0" ] ; then
echo "<h2>WARNING! SL5 but no libc-2.5</h2>"
echo "<p>WARNING! SL5 but no libc-2.5</p>"
echo "<pre>"
echo "osVersion/slVersion =" $osVersion $slVersion
echo "ls -l /lib/libc*"
ls -l /lib/libc*
echo "</pre>"
exit $SAME_OK
fi
......@@ -69,6 +72,7 @@ fi
# this test requires SLC5 arch, currently
export SCRAM_ARCH=slc5_amd64_gcc434
export BUILD_ARCH=$SCRAM_ARCH
echo "<pre>"
source $SW_DIR/cmsset_default.sh > $tmpfile 2>&1
result=$?
cat $tmpfile
......@@ -78,12 +82,12 @@ result2=$?
rm -f $tmpfile
if [ $result != 0 ]
then
echo "ERROR: $SW_DIR/cmsset_default.sh non existent or non readable"
echo "<p>ERROR: $SW_DIR/cmsset_default.sh non existent or non readable</p>"
exit $SAME_ERROR
fi
if [ $result2 == 0 ]
then
echo "ERROR: $SW_DIR/cmsset_default.sh failed"
echo "<p>ERROR: $SW_DIR/cmsset_default.sh failed</p>"
# temporarely set this to WARNING to allow soft fail for SL4 clusters
exit $SAME_WARNING
fi
......@@ -91,26 +95,27 @@ fi
# Execute main test scripts
echo "<h3>Test analysis of data from /store/data </h3>"
echo "<pre>"
echo "Running $SAME_SENSOR_HOME/tests/AnalysisTest.sh 2>&1"
echo "Running $SAME_SENSOR_HOME/tests/AnalysisTest.sh 2>&amp;1"
AnalysisTestWorkDir=`mktemp -d AnalysisTestWorkDir.XXXXXXXXXX`
pushd . > /dev/null
cd $AnalysisTestWorkDir
pwd
$SAME_SENSOR_HOME/tests/AnalysisTest.sh 2>&1
$SAME_SENSOR_HOME/tests/AnalysisTest.sh > AnalysisTest.out 2>&1
result=$?
cat AnalysisTest.out
echo "AnalysisTest.sh executed with exit code " $result
echo "</pre>"
popd > /dev/null
if [ $result == $SAME_WARNING ] ; then
if [ $result == "$SAME_WARNING" ] ; then
warn=1
fi
if [ $result == $SAME_ERROR ] ; then
if [ $result == "$SAME_ERROR" ] ; then
err=1
fi
if [ $result != $SAME_OK ] ; then
if [ $result != "$SAME_OK" ] ; then
warn=1
fi
......
Supports Markdown
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