CE-cms-dummy 12.5 KB
Newer Older
Stefano Belforte's avatar
Stefano Belforte committed
1
#!/bin/sh
Stefano Belforte's avatar
Stefano Belforte committed
2

3
info=0
Stefano Belforte's avatar
Stefano Belforte committed
4
note=0
5
6
warning=0
error=0
Stefano Belforte's avatar
Stefano Belforte committed
7
8
9

cat $SAME_SENSOR_HOME/tests/CMS-SAM-Banner.html

10
11
echo '<h1><a href="#summary">Jump to test summary</a></h1>'
echo "<h2>Preliminary checks</h2>"
Stefano Belforte's avatar
Stefano Belforte committed
12
echo "<pre>"
Stefano Belforte's avatar
Stefano Belforte committed
13
14
echo "version 2-11 13:00"
set -x
Stefano Belforte's avatar
Stefano Belforte committed
15
16
uname -a
date
Stefano Belforte's avatar
Stefano Belforte committed
17
18
voms-proxy-info -identity -fqan
id
19
cp -v $SAME_SENSOR_HOME/tests/fetch-from-web .
Stefano Belforte's avatar
Stefano Belforte committed
20
21
22
23
#ls -l fetch-from-web
cp -v $SAME_SENSOR_HOME/tests/CMS-SAM-Banner.html .
env|grep SAME
set +x
24
25
echo "</pre>"

Stefano Belforte's avatar
Stefano Belforte committed
26
echo "<h2>Checking software directory for CMS VO</h2>"
Stefano Belforte's avatar
Stefano Belforte committed
27
28
if [ -n "$OSG_APP" ] ; then
    SW_DIR=$OSG_APP/cmssoft/cms
Stefano Belforte's avatar
Stefano Belforte committed
29
    [ -f $OSG_GRID/setup.sh ] && source $OSG_GRID/setup.sh
30
    echo "Checking variable: \$OSG_APP/cmssoft/cms=$OSG_APP/cmssoft/cms"
Stefano Belforte's avatar
Stefano Belforte committed
31
32
elif [ -n "$VO_CMS_SW_DIR" ] ; then
    SW_DIR=$VO_CMS_SW_DIR
33
    echo "Checking variable: \$VO_CMS_SW_DIR=$VO_CMS_SW_DIR"
Stefano Belforte's avatar
Stefano Belforte committed
34
35
else
    echo "ERROR: Neither VO_CMS_SW_DIR nor OSG_APP defined"
Stefano Belforte's avatar
Stefano Belforte committed
36
    echo "summary: SW_DIR_UNDEF"
Stefano Belforte's avatar
Stefano Belforte committed
37
38
    exit $SAME_ERROR
fi
Stefano Belforte's avatar
Stefano Belforte committed
39
echo "<pre>"
Stefano Belforte's avatar
Stefano Belforte committed
40
set -x
Stefano Belforte's avatar
Stefano Belforte committed
41
42
ls -ld $SW_DIR
result=$?
Stefano Belforte's avatar
Stefano Belforte committed
43
set +x
Stefano Belforte's avatar
Stefano Belforte committed
44
echo "</pre>"
45
echo
Stefano Belforte's avatar
Stefano Belforte committed
46

Stefano Belforte's avatar
Stefano Belforte committed
47
48
if [ $result != 0 ]
    then
Stefano Belforte's avatar
Stefano Belforte committed
49
50
    echo "ERROR: software directory non existent or non readable"
    echo "summary: NO_SW_DIR"
Stefano Belforte's avatar
Stefano Belforte committed
51
52
53
54
55
56
57
    exit $SAME_ERROR
fi

if [ ! -f $SW_DIR/cmsset_default.sh ] ; then
    echo "<h3>"
    echo "ERROR: cmssw setup file $SW_DIR/cmsset_default.sh not existing"
    echo "</h3>"
Stefano Belforte's avatar
Stefano Belforte committed
58
    echo "summary: NO_SETUP_SCRIPT"
Stefano Belforte's avatar
Stefano Belforte committed
59
60
61
62
    exit $SAME_ERROR
fi

echo "<h2>Sourcing the CMS environment</h2>"
Stefano Belforte's avatar
Stefano Belforte committed
63
export SCRAM_ARCH=slc4_ia32_gcc345
Stefano Belforte's avatar
Stefano Belforte committed
64
echo "<pre>"
Stefano Belforte's avatar
Stefano Belforte committed
65
66
source $SW_DIR/cmsset_default.sh
result=$?
Stefano Belforte's avatar
Stefano Belforte committed
67
68
echo "</pre>"

Stefano Belforte's avatar
Stefano Belforte committed
69
70
71
72
73
74
75
if [ $result != 0 ]
    then
    echo "<h3>"
    echo "ERROR: CMS software initialisation script cmsset_default.sh failed"
    echo "summary: NO_SETUP_SCRIPT"
    echo "</h3>"
    exit $SAME_ERROR
Stefano Belforte's avatar
Stefano Belforte committed
76
77
78
79
fi

echo "<h2>Make sure configuration directory is there</h2>"
echo "Checking variable: \$CMS_PATH=$CMS_PATH"
Stefano Belforte's avatar
Stefano Belforte committed
80
echo "<p>"
Stefano Belforte's avatar
Stefano Belforte committed
81
if [ -z $CMS_PATH ]; then
Stefano Belforte's avatar
Stefano Belforte committed
82
83
84
85
86
    echo "<h3>"
    echo "ERROR: CMS_PATH not defined"
    echo "summary: CMS_PATH_UNDEF"
    echo "</h3>"
    exit $SAME_ERROR
Stefano Belforte's avatar
Stefano Belforte committed
87
88
89
fi

if [ ! -d $CMS_PATH ] ; then
Stefano Belforte's avatar
Stefano Belforte committed
90
91
92
93
94
    echo "<h3>"
    echo "ERROR: CMS_PATH directory $CMS_PATH not existing"
    echo "summary: NO_CMS_PATH"
    echo "</h3>"
    exit $SAME_ERROR
Stefano Belforte's avatar
Stefano Belforte committed
95
fi
Stefano Belforte's avatar
Stefano Belforte committed
96
97
98
99
100
101
102
103
104

if [ ! -d $CMS_PATH/SITECONF/local/JobConfig ] ; then
    echo "<h3>"
    echo "ERROR: JobConfig directory $CMS_PATH/SITECONF/local/JobConfig not existing"
    echo "summary: NO_JOBCONFIG_DIR"
    echo "</h3>"
    exit $SAME_ERROR
fi

Stefano Belforte's avatar
Stefano Belforte committed
105
106
107
echo "<p>"
echo "OK"

Stefano Belforte's avatar
Stefano Belforte committed
108
109
110
111
112
113
114
115
116
117
118
119
echo "<h2>Make sure configuration file exists</h2>"

ConfigFile=${CMS_PATH}/SITECONF/local/JobConfig/site-local-config.xml
echo "Configuration file: $ConfigFile"
echo "<p>"

if [ ! -f $ConfigFile ] ; then
    echo "<h3>"
    echo "ERROR: Local Configuration file site-local-config.xml not existing"
    echo "summary: NO_SITELOCALCONFIG"
    echo "</h3>"
    exit $SAME_ERROR
Stefano Belforte's avatar
Stefano Belforte committed
120
121
122
fi
echo "<p>"
echo "OK"
Stefano Belforte's avatar
Stefano Belforte committed
123
echo "dump of Local Configuration file is <a href=\"#CfgDump\">here</a>"
Stefano Belforte's avatar
Stefano Belforte committed
124

Stefano Belforte's avatar
Stefano Belforte committed
125
126
echo "<h2>Make sure local configuration file has entries for TriviaFileCatalog,
local stage, site name and Squid</h2>"
Stefano Belforte's avatar
Stefano Belforte committed
127

Stefano Belforte's avatar
Stefano Belforte committed
128
129
130
131
132
133
134
grep -q "trivialcatalog" $ConfigFile
status=$?
if [ $status != 0 ] ; then
    echo "ERROR: TrivialFileCatlog string missing"
    errorSummary="summary: NO_TFC"
    error=1
fi
Stefano Belforte's avatar
Stefano Belforte committed
135

Stefano Belforte's avatar
Stefano Belforte committed
136
137
138
139
140
141
142
grep -q "local-stage-out" $ConfigFile
status=$?
if [ $status != 0 ] ; then
    echo "ERROR: LocalStageOut string missing"
    errorSummary="summary: NO_LOCALSTAGEOUT"
    error=1
fi
Stefano Belforte's avatar
Stefano Belforte committed
143

Stefano Belforte's avatar
Stefano Belforte committed
144
145
146
147
148
149
grep -q "site name" $ConfigFile
status=$?
if [ $status != 0 ] ; then
    echo "ERROR: site name string missing"
    errorSummary="summary: NO_SiteName"
    error=1
Stefano Belforte's avatar
Stefano Belforte committed
150
fi
Stefano Belforte's avatar
Stefano Belforte committed
151
152
153
154
155
156
157

grep -q "frontier-connect" $ConfigFile
status=$?
if [ $status != 0 ] ; then
    echo "ERROR: Frontier Configuration string missing"
    errorSummary="summary: NO_FRONTIER_CONFIG"
    error=1
158
fi
Stefano Belforte's avatar
Stefano Belforte committed
159
160
161
162

if [ $error == 0 ] ; then
 echo "<p>"
 echo "OK"
Stefano Belforte's avatar
Stefano Belforte committed
163
164
fi

Stefano Belforte's avatar
Stefano Belforte committed
165
166
167
168
169
170
171
172
173
174
echo "<p>"

echo "<h2>Make sure TFC file is where config file says it should be</h2>"
TFCfile=`grep "trivialcatalog" $ConfigFile | cut -d':' -f2| cut -d'?' -f1|head -1`
echo "Checking file: $TFCfile"

if [ ! -f $TFCfile ] ; then
    echo "ERROR: TrivialFileCatalg $TFCfile not existing"
    errorSummary="summary: NO_TFC file"
    error=1
Stefano Belforte's avatar
Stefano Belforte committed
175
fi
Stefano Belforte's avatar
Stefano Belforte committed
176
177
178
#if [ $err == 1 ] ; then
#    exit $SAME_ERROR
#fi
Stefano Belforte's avatar
Stefano Belforte committed
179

Stefano Belforte's avatar
Stefano Belforte committed
180
181
182
183
184
185
186
187
188
echo "<p>"
echo "OK"
echo "<p>"

if [ $error == 1 ] ; then
    echo "<h3>"
    echo "ERROR: invalid local configuration file $ConfigFile"
    echo $errorSummary
    echo "</h3>"
189
190
fi

Stefano Belforte's avatar
Stefano Belforte committed
191
echo "<h2>Compare local configuration file and TFC with CVS</h2>"
Stefano Belforte's avatar
Stefano Belforte committed
192

Stefano Belforte's avatar
Stefano Belforte committed
193
siteName=`grep "site name" $ConfigFile | grep -v "subsite name" | cut -d'"' -f2`
Stefano Belforte's avatar
Stefano Belforte committed
194
echo "<pre>"
Stefano Belforte's avatar
Stefano Belforte committed
195
196
197
198
199
200
201
202
203
204
205
206
207
208
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=
if [ "x$subSiteName" == "x" ] ; then
   echo "subSiteName =" $subSiteName
else
   echo "subSiteName =" $subSiteName
   _subSiteName=_`echo $subSiteName`
fi
echo "<br>"
Stefano Belforte's avatar
Stefano Belforte committed
209

Stefano Belforte's avatar
Stefano Belforte committed
210
211
212
213
214
asCvs=1
cvsUrl="\"http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/COMP/SITECONF/${siteName}/JobConfig/site-local-config${_subSiteName}.xml?rev=HEAD&content-type=text/plain\""
ConfigFileFromCVS=`mktemp /tmp/site-local-config-from-CVS.xml.XXX`
echo "Fetch CVS copy of local config from $cvsUrl<br>"
./fetch-from-web $cvsUrl $ConfigFileFromCVS
Stefano Belforte's avatar
Stefano Belforte committed
215
rc=$?
Stefano Belforte's avatar
Stefano Belforte committed
216
echo "rc = $rc <br>"
Stefano Belforte's avatar
Stefano Belforte committed
217
[ $rc == $SAME_INFO ] && info=1
Stefano Belforte's avatar
Stefano Belforte committed
218
219
220
221
222
[ $rc == $SAME_NOTICE ] && note=1

#if [ $rc == $SAME_WARNING ] || [ $rc == $SAME_ERROR ] ; then
#  echo "<br>INFO: failed to access CVS Web repository<bre>"
#else
Stefano Belforte's avatar
Stefano Belforte committed
223

224
echo "</pre>"
Stefano Belforte's avatar
Stefano Belforte committed
225

Stefano Belforte's avatar
Stefano Belforte committed
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
if [ $rc == $SAME_OK ] || [ $rc == $SAME_INFO ] ; then
  diff -q -w -B $ConfigFile $ConfigFileFromCVS
  if [ $? == 1 ] ; then asCvs=0; fi
  echo "<br>"
  if [ $asCvs == 0 ] ; then
    cvsMarkupUrl="\"http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/COMP/SITECONF/${siteName}/JobConfig/site-local-config${_subSiteName}.xml?view=markup\""
    ConfigFileMarkup=`mktemp /tmp/site-local-config-from-CVS-Markup.xml.XXX`
    echo "Fetch CVS Markup copy of local config from $cvsMarkupUrl<br>"
    ./fetch-from-web $cvsMarkupUrl $ConfigFileMarkup
    rc=$?
    echo "rc = $rc <br>"
    [ $rc == $SAME_INFO ] && info=1
    [ $rc == $SAME_NOTICE ] && note=1
  
    cvsFileDate=`grep "<em>" $ConfigFileMarkup |head -1|awk -F '<em>|</em>' '{print $2 }'`
    let seconds=`date +%s`-`date +%s -d "$cvsFileDate"`
    let cvsFileAgeInHours=$seconds/3600
    echo "<pre>"
    echo CVS version of Local Configuration file is ${cvsFileAgeInHours} hours old
    echo "</pre>"
    if [ $localConfigFileAgeInHours -gt 72 ] && [ $cvsFileAgeInHours -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>"
    cat $diffList | sed 's/</\&lt;/g' | sed 's/>/\&gt;/g'
    echo "</pre>"
    rm -f $diffList
  else
    echo "OK local site configuration file agrees with CVS copy"
    echo "<br>"
  fi
  rm -f $ConfigFileFromCVS
else
  echo "<br>NOTICE: failed to access CVS Web repository<bre>"
  note=1
Stefano Belforte's avatar
Stefano Belforte committed
268
fi
Stefano Belforte's avatar
Stefano Belforte committed
269
echo "<br>"
Stefano Belforte's avatar
Stefano Belforte committed
270

Stefano Belforte's avatar
Stefano Belforte committed
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
echo "dump of Local Configuration file is <a href=\"#CfgDump\">here</a>"
echo "<br>"

TFCfileName=`echo $TFCfile | awk -F'/' '{print $NF}'`

echo "<pre>"
let seconds=`date +%s`-`stat -c%Y $ConfigFile`
let localTFCfileAgeInHours=$seconds/3600
echo local TFC 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\""

cvsUrl="\"http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/COMP/SITECONF/${siteName}/PhEDEx/${TFCfileName}?rev=HEAD&content-type=text/plain\""

echo TFCfileName: $TFCfileName
echo cvsUrl $cvsUrl
echo "</pre>"

TfcFileFromCVS=`mktemp /tmp/storage-from-CVS.xml.XXXX`
echo "Fetch CVS copy of TFC from $cvsUrl<br>"
./fetch-from-web $cvsUrl $TfcFileFromCVS
rc=$?
echo "rc = $rc <br>"
[ $rc == $SAME_INFO ] && info=1
[ $rc == $SAME_NOTICE ] && note=1

#if [ $rc == $SAME_WARNING ] || [ $rc == $SAME_ERROR ] ; then
#  echo "<br>INFO: failed to access CVS Web repository<bre>"
#else

echo "</pre>"

if [ $rc == $SAME_OK ] || [ $rc == $SAME_INFO ] ; then
  diff -q -w -B $TFCfile $TfcFileFromCVS
  if [ $? == 1 ] ; then asCvs=0; fi
  echo "<br>"
  if [ $asCvs == 0 ] ; then

    cvsMarkupUrl="\"http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/COMP/SITECONF/${siteName}/PhEDEx/${TFCfileName}?view=markup\""
    TfcFileMarkup=`mktemp /tmp/TFC-from-CVS-Markup.xml.XXX`
    echo "Fetch CVS Markup copy of TFC from $cvsMarkupUrl<br>"
    ./fetch-from-web $cvsMarkupUrl $TfcFileMarkup
    rc=$?
    echo "rc = $rc <br>"
    [ $rc == $SAME_INFO ] && info=1
    [ $rc == $SAME_WARNING ] && warning=1
  
    cvsFileDate=`grep "<em>" $TfcFileMarkup |head -1|awk -F '<em>|</em>' '{print $2 }'`
    let seconds=`date +%s`-`date +%s -d "$cvsFileDate"`
    let cvsFileAgeInHours=$seconds/3600
    echo "<pre>"
    echo CVS version of Local Configuration file is ${cvsFileAgeInHours} hours old
    echo "</pre>"
    if [ $localTFCfileAgeInHours -gt 72 ] && [ $cvsFileAgeInHours -gt 72 ] ; then
#    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"
Stefano Belforte's avatar
Stefano Belforte committed
332
    fi
Stefano Belforte's avatar
Stefano Belforte committed
333
334
335
336
337
338
339
340
341
    diffList=`mktemp /tmp/diflist.XXXX`
    diff $TFCfile $TfcFileFromCVS > $diffList
    echo "<pre>"
    cat $diffList | sed 's/</\&lt;/g' | sed 's/>/\&gt;/g'
    echo "</pre>"
    rm -f $diffList
  else
    echo "OK local Trivial File Catalog file agrees with CVS copy"
    echo "<br>"
Stefano Belforte's avatar
Stefano Belforte committed
342
  fi
Stefano Belforte's avatar
Stefano Belforte committed
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
  rm -f $TfcFileFromCVS
else
  echo "<br>NOTICE: failed to access CVS Web repository<bre>"
  note=1
fi

echo "<p>dump of TFC file is <a href=\"#TFCDump\">here</a>"


echo "<p>"


echo "<h2>Verify presence of commands needed for remote stageout</h2>"
echo "Needs at least ( lcg_utils 1.6.7 and gfal 1.10.8 ) or ( srmcp 2.0 ) " 

echo "<p>"
echo "<pre>"
stageOutError=1

note=1
which lcg-cp
rc=$?
if [ $rc == 0 ] ; then
  lcg-cp --version
  lcgVersion=`lcg-cp --version|grep "lcg_util"|cut -d'-' -f2`
  gfalVersion=`lcg-cp --version|grep GFAL|cut -d'-' -f3`
  lcgV1=`echo $lcgVersion|cut -d. -f1`
  lcgV2=`echo $lcgVersion|cut -d. -f2`
  lcgV3=`echo $lcgVersion|cut -d. -f3`
  gfalV1=`echo $gfalVersion|cut -d. -f1`
  gfalV2=`echo $gfalVersion|cut -d. -f2`
  gfalV3=`echo $gfalVersion|cut -d. -f3`
  lcgOK=0
  if [ $lcgV1 -gt 1 ] ; then
    lcgOK=1
  else
    if [ $lcgV1 -eq 1 ] && [ $lcgV2 -gt 6 ] ; then
      lcgOK=1
    else
      if [ $lcgV2 -eq 6 ] && [ $lcgV3 -ge 7 ] ; then
	lcgOK=1
Stefano Belforte's avatar
Stefano Belforte committed
384
385
      fi
    fi
Stefano Belforte's avatar
Stefano Belforte committed
386
387
388
389
390
391
392
393
394
395
  fi
  gfalOK=0
  if [ $gfalV1 -gt 1 ] ; then
    gfalOK=1
  else
    if [ $gfalV1 -eq 1 ] && [ $gfalV2 -gt 10 ] ; then
      gfalOK=1
    else
      if [ $gfalV2 -eq 10 ] && [ $gfalV3 -ge 8 ] ; then
	 gfalOK=1
Stefano Belforte's avatar
Stefano Belforte committed
396
      fi
397
    fi
Stefano Belforte's avatar
Stefano Belforte committed
398
  fi
Stefano Belforte's avatar
Stefano Belforte committed
399

Stefano Belforte's avatar
Stefano Belforte committed
400
401
402
403
  if [ $lcgOK == 1 ] ; then
      if [ $gfalOK == 1 ] ; then
	  stageOutError=0
          note=0
Stefano Belforte's avatar
Stefano Belforte committed
404
      fi
Stefano Belforte's avatar
Stefano Belforte committed
405
  fi
Stefano Belforte's avatar
Stefano Belforte committed
406
407
fi

Stefano Belforte's avatar
Stefano Belforte committed
408
409
410
411
if [ $note == 1 ] ; then
    echo "<strong>"
    echo "NOTE: proper version of lcg-cp not available"
    echo "</strong>"
Stefano Belforte's avatar
Stefano Belforte committed
412
413
fi

Stefano Belforte's avatar
Stefano Belforte committed
414
echo "</pre><p><pre>"
Stefano Belforte's avatar
Stefano Belforte committed
415

Stefano Belforte's avatar
Stefano Belforte committed
416
417
which srmcp
rc=$?
Stefano Belforte's avatar
Stefano Belforte committed
418

Stefano Belforte's avatar
Stefano Belforte committed
419
420
421
422
423
424
425
426
427
if [ $rc == 0 ] ; then
  srmcp -version | grep -v WARNING
  srmcpVersion=`srmcp -version 2>&1|egrep "Client version"|awk '{print $(NF)'}`
  srmcpV1=`echo $srmcpVersion|cut -d. -f1`
  srmcpV2=`echo $srmcpVersion|cut -d. -f2`
#  srmcpV3=`echo $srmcpVersion|cut -d. -f3`
  if [ $srmcpV1 -ge 2 ] ; then
      stageOutError=0
  fi
Stefano Belforte's avatar
Stefano Belforte committed
428
429
430
fi


Stefano Belforte's avatar
Stefano Belforte committed
431
432
433
434
435
436
echo "</pre>"
if [ $stageOutError == 1  ] ; then
    echo "ERROR: No validated command for remote stageout available"
    error=1
else
    echo "OK"
Stefano Belforte's avatar
Stefano Belforte committed
437
fi
Stefano Belforte's avatar
Stefano Belforte committed
438
echo "<p>"
Stefano Belforte's avatar
Stefano Belforte committed
439
440
441
442




Stefano Belforte's avatar
Stefano Belforte committed
443
444
445
echo "<p>"
echo "<hr>"
echo "<p>"
Stefano Belforte's avatar
Stefano Belforte committed
446
447


Stefano Belforte's avatar
Stefano Belforte committed
448
449
450
451
452
453
454
455
456
457
458
echo "<h2>Dump of local configuration files</h2><br>"

echo "<h3><a name="CfgDump"></a>Configuration File Dump</h3><pre>"
cat $ConfigFile  | sed 's/</\&lt;/g' | sed 's/>/\&gt;/g'
echo "</pre>"

echo "<h3><a name="TFCDump"></a>TFC file Dump</h3><pre>"
cat $TFCfile  | sed 's/</\&lt;/g' | sed 's/>/\&gt;/g'
echo "</pre>"

echo '<h1><a name="summary"> Test Summary</a></h1><p>'
Stefano Belforte's avatar
Stefano Belforte committed
459
460


Stefano Belforte's avatar
Stefano Belforte committed
461
if [ $error == 1 ]
Stefano Belforte's avatar
Stefano Belforte committed
462
463
464
465
466
then
  echo "<p><strong> ERROR </strong></p>"
  exit $SAME_ERROR
fi

Stefano Belforte's avatar
Stefano Belforte committed
467
if [ $warning == 1 ]
Stefano Belforte's avatar
Stefano Belforte committed
468
469
470
471
472
then
  echo "<p><strong> WARNING </strong></p>"
  exit $SAME_WARNING
fi

Stefano Belforte's avatar
Stefano Belforte committed
473
if [ $note == 1 ]
Stefano Belforte's avatar
Stefano Belforte committed
474
475
476
477
478
479
480
481
482
483
484
485
486
487
then
  echo "<p><strong> NOTE </strong></p>"
  exit $SAME_NOTICE
fi

if [ $info == 1 ]
then
  echo "<p><strong> INFO </strong></p>"
  exit $SAME_INFO
fi


echo "<p><strong> OK </strong></p>"
exit $SAME_OK