Commit 0791c9b3 authored by Andrea Sciaba's avatar Andrea Sciaba
Browse files

HTML-compliant output

parent c766f9de
...@@ -16,16 +16,16 @@ echo "</pre>" ...@@ -16,16 +16,16 @@ echo "</pre>"
echo "<h3>Sourcing the CMS environment</h3>" echo "<h3>Sourcing the CMS environment</h3>"
export SCRAM_ARCH=slc4_ia32_gcc345 export SCRAM_ARCH=slc4_ia32_gcc345
if [ -n "$OSG_APP" ] ; then if [ -n "$OSG_APP" ] ; then
echo "This is an OSG site" echo "<p>This is an OSG site</p>"
SW_DIR=$OSG_APP/cmssoft/cms SW_DIR=$OSG_APP/cmssoft/cms
source $OSG_GRID/setup.sh source $OSG_GRID/setup.sh
result=$? result=$?
elif [ -n "$VO_CMS_SW_DIR" ] ; then elif [ -n "$VO_CMS_SW_DIR" ] ; then
echo "This is an LCG site" echo "<p>This is an LCG site</p>"
SW_DIR=$VO_CMS_SW_DIR SW_DIR=$VO_CMS_SW_DIR
result=$? result=$?
else 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 exit $SAME_ERROR
fi fi
echo "<pre>" echo "<pre>"
...@@ -34,7 +34,7 @@ result=$(expr $? + $result) ...@@ -34,7 +34,7 @@ result=$(expr $? + $result)
echo "</pre>" echo "</pre>"
if [ $result != 0 ] if [ $result != 0 ]
then then
echo "ERROR: $VO_CMS_SW_DIR/cmsset_default.sh non existent or non readable" echo "<p>ERROR: $VO_CMS_SW_DIR/cmsset_default.sh non existent or non readable</p>"
exit $SAME_ERROR exit $SAME_ERROR
fi fi
...@@ -46,32 +46,30 @@ echo "PYTHONPATH=$PYTHONPATH" ...@@ -46,32 +46,30 @@ echo "PYTHONPATH=$PYTHONPATH"
echo "</pre>" echo "</pre>"
echo "<h3>Invoking site test</h3>" echo "<h3>Invoking site test</h3>"
echo "<pre>" echo "<pre>"
echo "<h5>"
echo "USER/WHOAMI?:" $USER/`whoami` echo "USER/WHOAMI?:" $USER/`whoami`
echo "USER ID:" $UID echo "USER ID:" $UID
voms-proxy-info -all voms-proxy-info -all
echo "</h5>"
echo "</pre>" echo "</pre>"
cd $SAME_SENSOR_HOME/cms-MC-test/ cd $SAME_SENSOR_HOME/cms-MC-test/
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "ERROR: Could not access the cms-MC-test directory" echo "<p>ERROR: Could not access the cms-MC-test directory</p>"
exit $SAME_ERROR exit $SAME_ERROR
else else
echo "<pre>" echo "<pre>"
chmod u+x RuntimeSAMStageOut.py chmod u+x RuntimeSAMStageOut.py
./RuntimeSAMStageOut.py 2>&1 ./RuntimeSAMStageOut.py | sed -e 's/&/&amp;/g' 2>&1
EXIT_STATUS=$? EXIT_STATUS=$?
fi fi
echo "</pre>" echo "</pre>"
if [ $EXIT_STATUS -ne 0 -a $EXIT_STATUS -ne 4 ] ; then if [ $EXIT_STATUS -ne 0 -a $EXIT_STATUS -ne 4 ] ; then
echo "ERROR: Stage Out Test failed: $EXIT_STATUS" echo "<p>ERROR: Stage Out Test failed: $EXIT_STATUS</p>"
exit $SAME_ERROR exit $SAME_ERROR
elif [ $EXIT_STATUS -eq 4 ]; then elif [ $EXIT_STATUS -eq 4 ]; then
echo "WARNING: Stage Out Test failed to cleanup the test file: $EXIT_STATUS" echo "<p>WARNING: Stage Out Test failed to cleanup the test file: $EXIT_STATUS</p>"
exit $SAME_WARNING exit $SAME_WARNING
else else
echo "Stage Out Test successful" echo "<p>Stage Out Test successful</p>"
exit $SAME_OK exit $SAME_OK
fi 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