Commit 3746fac2 authored by Stefano Belforte's avatar Stefano Belforte
Browse files

test new basic

parent 01e29012
......@@ -10,7 +10,7 @@ cat $SAME_SENSOR_HOME/tests/CMS-SAM-Banner.html
echo '<h1><a href="#summary">Jump to test summary</a></h1>'
echo "<h2>Preliminary checks</h2>"
echo "<pre>"
echo "version 1-11 21:00"
echo "version 2-11 13:00"
set -x
uname -a
date
......@@ -191,6 +191,10 @@ fi
echo "<h2>Compare local configuration file and TFC with CVS</h2>"
siteName=`grep "site name" $ConfigFile | grep -v "subsite name" | cut -d'"' -f2`
let seconds=`date %s`-`stat -c%Y $ConfigFile`
let localConfigFileAgeInHours=$seconds/3600
echo local configuration file ${ConfigFile} is ${localConfigFileAgeInHours} hours old
echo "siteName =" $siteName
subSiteName=`grep "subsite name" $ConfigFile | cut -d'"' -f2`
_subSiteName=
......@@ -222,8 +226,14 @@ if [ $rc == $SAME_OK ] || [ $rc == $SAME_INFO ] ; then
if [ $? == 1 ] ; then asCvs=0; fi
echo "<br>"
if [ $asCvs == 0 ] ; then
error=1
echo "<strong>ERROR: local site configuration file differ from CVS</strong>"
if [ $localConfigFileAgeInHours -gt 72 ] then
error=1
echo "<strong>ERROR: local site configuration file differ from CVS</strong>"
else
warning=1
echo "<strong>WARNING: local site configuration file differ from CVS</strong>"
echo "<br>will become error if this difference lasts more then 72h"
fi
diffList=`mktemp /tmp/diflist.XXXX`
diff $ConfigFile $ConfigFileFromCVS > $diffList
echo "<pre>"
......@@ -244,18 +254,19 @@ echo "<br>"
echo "dump of Local Configuration file is <a href=\"#CfgDump\">here</a>"
echo "<br>"
echo "<pre>"
TFCfileName=`echo $TFCfile | awk -F'/' '{print $NF}'`
echo TFCfileName: $TFCfileName
let seconds=`date %s`-`stat -c%Y $ConfigFile`
let localTFCfileAgeInHours=$seconds/3600
echo local configuration file ${TFCfile} is ${localTFCfileAgeInHours} hours old
asCvs=1
cvsUrl="\"http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/COMP/SITECONF/${siteName}/PhEDEx/storage${_subSiteName}.xml?rev=HEAD&content-type=text/plain\""
echo cvsUrl: $cvsUrl
newCvsUrl="\"http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/COMP/SITECONF/${siteName}/PhEDEx/${TFCfileName}?rev=HEAD&content-type=text/plain\""
echo newCvsUrl: $newCvsUrl
#cvsUrl="\"http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/COMP/SITECONF/${siteName}/PhEDEx/storage${_subSiteName}.xml?rev=HEAD&content-type=text/plain\""
echo set cvsUrl to be new one $newCvsUrl
cvsUrl=$newCvsUrl
cvsUrl="\"http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/COMP/SITECONF/${siteName}/PhEDEx/${TFCfileName}?rev=HEAD&content-type=text/plain\""
echo "<pre>"
echo TFCfileName: $TFCfileName
echo cvsUrl $cvsUrl
echo"</pre>"
......@@ -275,8 +286,13 @@ if [ $rc == $SAME_OK ] || [ $rc == $SAME_INFO ] ; then
if [ $? == 1 ] ; then asCvs=0; fi
echo "<br>"
if [ $asCvs == 0 ] ; then
error=1
echo "<strong>ERROR: local Trivial Catalog File file differ from CVS</strong>"
if [ $localTFCfileAgeInHours -gt 72 ] then
error=1
echo "<strong>ERROR: local Trivial Catalog File file differ from CVS</strong>"
else
echo "<strong>WARNING: local Trivial Catalog File differ from CVS</strong>"
echo "<br>will become error if this difference lasts more then 72h"
fi
diffList=`mktemp /tmp/diflist.XXXX`
diff $TFCfile $TfcFileFromCVS > $diffList
echo "<pre>"
......
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