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

3
info=0
4
notice=0
5
6
warning=0
error=0
7
8
9
isEGEE=0
isOSG=0
export LANG=C
Stefano Belforte's avatar
Stefano Belforte committed
10
11
12

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

13
echo '<h1><a href="#summary">Jump to test summary</a></h1>'
14

15
echo "<h2>Preliminary checks</h2>"
Stefano Belforte's avatar
Stefano Belforte committed
16
echo "<pre>"
17
echo "version 25-03-2010 21:00"
Stefano Belforte's avatar
Stefano Belforte committed
18
uname -a
19
cat /etc/issue
20
21
22
23
echo
if [ -f /etc/redhat-release ]; then
    cat /etc/redhat-release
fi
Stefano Belforte's avatar
Stefano Belforte committed
24
date
25
date --utc
Stefano Belforte's avatar
Stefano Belforte committed
26
27
voms-proxy-info -identity -fqan
id
28
29
30
31

workdir=`mktemp -d workdirXXXXXX`
cd $workdir
cp -v $SAME_SENSOR_HOME/tests/cmssw_required_version_list.txt .
32
cp -v $SAME_SENSOR_HOME/tests/fetch-from-web .
33
34
35
36
37
38
39
40
41
42
cp -v $SAME_HOME/.BrokerInfo .

[ -n "$GLITE_WMS_RB_BROKERINFO" ] && cp -v $GLITE_WMS_RB_BROKERINFO .
[ -n "$EDG_WL_RB_BROKERINFO" ] &&  cp -v $EDG_WL_RB_BROKERINFO .

echo "</pre>"

echo "Memory:"
echo "<pre>"
cat /proc/meminfo
43
echo "</pre>"
44
echo "<p>"
45

46
47
48
49
50
51
echo "Environment"
echo "<pre>"
echo "Platform traces before CMS setup?"
env | grep slc
echo "</pre>"

Stefano Belforte's avatar
Stefano Belforte committed
52
echo "<h2>Checking software directory for CMS VO</h2>"
53
54
echo "<p>"

Stefano Belforte's avatar
Stefano Belforte committed
55
if [ -n "$OSG_APP" ] ; then
56
    isOSG=1
Stefano Belforte's avatar
Stefano Belforte committed
57
    SW_DIR=$OSG_APP/cmssoft/cms
58
    echo "Checking variable: \$OSG_APP/cmssoft/cms=$OSG_APP/cmssoft/cms"
59
    echo "</p>"
Stefano Belforte's avatar
Stefano Belforte committed
60
elif [ -n "$VO_CMS_SW_DIR" ] ; then
61
    isEGEE=1
Stefano Belforte's avatar
Stefano Belforte committed
62
    SW_DIR=$VO_CMS_SW_DIR
63
    echo "Checking variable: \$VO_CMS_SW_DIR=$VO_CMS_SW_DIR"
64
    echo "</p>"
Stefano Belforte's avatar
Stefano Belforte committed
65
else
66
    echo "<strong>"
Stefano Belforte's avatar
Stefano Belforte committed
67
    echo "ERROR: Neither VO_CMS_SW_DIR nor OSG_APP defined"
68
    echo "</strong></p>"
Stefano Belforte's avatar
Stefano Belforte committed
69
70
    exit $SAME_ERROR
fi
Stefano Belforte's avatar
Stefano Belforte committed
71
72
73
74
echo "<pre>"
ls -ld $SW_DIR
result=$?
echo "</pre>"
75
echo
Stefano Belforte's avatar
Stefano Belforte committed
76

Stefano Belforte's avatar
Stefano Belforte committed
77
78
if [ $result != 0 ]
    then
79
80
81
82
    echo "<strong><p>"
    echo "ERROR: software $SW_DIR directory non existent or non readable"
    echo "</strong></p>"
#    echo "summary: NO_SW_DIR"
Stefano Belforte's avatar
Stefano Belforte committed
83
84
85
    exit $SAME_ERROR
fi

86
87
88
89
90
91
92
93
94
95
96
97
echo "<h3>A bit platform detection testing</h3>"
echo "<pre>"
if [ -x $SW_DIR/common/cmsos ]; then
    echo -n "cmsos reports: "
    $SW_DIR/common/cmsos
fi
if [ -x $SW_DIR/common/cmsarch ]; then
    echo -n "cmsarch reports: " 
    $SW_DIR/common/cmsarch 
fi
echo "</pre>" 

98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
echo "<h2><a name="DiskSpace"></a>Some trivial checks</h2>"
if [ "`echo $SW_DIR | cut -d / -f 2`" == "afs" ]; then
  echo "AFS mode"
  SPACE=`fs lq $SW_DIR | tail -1 | awk '{print (\$2-\$3)/1024 }'`
else
  SPACE=`df -k -P $SW_DIR | tail -1 | awk '{print \$4/1024}'`
fi
echo "Free disk space in $SW_DIR: $SPACE MB"


cantwrite=0
# on EGEE (but not CERN) check that lcgadmin can write to SW area
if [ $isEGEE == 1 ] && ! ( echo $SW_DIR | grep cern.ch )
then
  echo "<pre>"
  touch $SW_DIR/.sametest
  result=$?
  echo "</pre>"
  if [ $result != 0 ]
  then
    cantwrite=1
    echo "WARNING: cannot write to software area"
  fi
fi

Stefano Belforte's avatar
Stefano Belforte committed
123
124
125
126
127
128
129
130
131
if [ ! -f $SW_DIR/cmsset_default.sh ] ; then
    echo "<h3>"
    echo "ERROR: cmssw setup file $SW_DIR/cmsset_default.sh not existing"
    echo "</h3>"
    exit $SAME_ERROR
fi

echo "<h2>Sourcing the CMS environment</h2>"
echo "<pre>"
132
echo "source $SW_DIR/cmsset_default.sh"
Stefano Belforte's avatar
Stefano Belforte committed
133
echo "</pre>"
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
archs_defined='slc4_ia32_gcc345 slc5_ia32_gcc434 slc5_amd64_gcc434 slc3_ia32_gcc323'
archs_to_test='slc4_ia32_gcc345'
swok=0
for arch in $archs_defined ; do
  if [ $swok != 1 ] ; then
    export SCRAM_ARCH=$arch
    export BUILD_ARCH=$arch
    echo "<p>"
    echo "Testing with SCRAM_ARCH=$arch ..."
    echo "</p>"
    echo "<pre>"
    rm -f cmsset.log
    source $SW_DIR/cmsset_default.sh > cmsset.log 2>&1
    result=$?
    cat cmsset.log
    echo "</pre>"
    echo
    grep 'No such file or directory' cmsset.log > /dev/null 2>&1
    res=$?
    if [ $res == 0 ] ; then
	result=1
    fi
    if [ $result != 0 ]
Stefano Belforte's avatar
Stefano Belforte committed
157
    then
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
      echo "<p>"
      echo "WARNING: CMS software initialisation script cmsset_default.sh failed for SCRAM_ARCH=$arch"
      echo "</p>"
    else
	swok=1
    fi
  fi
done

if [ $swok != 1 ]
then
  echo "<strong><p>"
  echo "ERROR: CMS software initialisation script cmsset_default.sh failed for all architectures"
  echo "</strong></p>"
  exit $SAME_ERROR
Stefano Belforte's avatar
Stefano Belforte committed
173
fi
174
175
176
echo "<p>"
echo "OK"
echo "</p>"
Stefano Belforte's avatar
Stefano Belforte committed
177
178

echo "<h2>Make sure configuration directory is there</h2>"
Stefano Belforte's avatar
Stefano Belforte committed
179
echo "<p>"
180
181
echo "Checking variable: \$CMS_PATH=$CMS_PATH"
echo "</p>"
Stefano Belforte's avatar
Stefano Belforte committed
182
if [ -z $CMS_PATH ]; then
183
184
185
186
  echo "<strong><p>"
  echo "ERROR: CMS_PATH not defined"
  echo "</strong></p>"
  exit $SAME_ERROR
Stefano Belforte's avatar
Stefano Belforte committed
187
188
189
fi

if [ ! -d $CMS_PATH ] ; then
190
191
192
193
  echo "<strong><p>"
  echo "ERROR: CMS_PATH directory $CMS_PATH not existing"
  echo "</strong></p>"
  exit $SAME_ERROR
Stefano Belforte's avatar
Stefano Belforte committed
194
fi
Stefano Belforte's avatar
Stefano Belforte committed
195
196
echo "<p>"
echo "OK"
197
echo "</p>"
Stefano Belforte's avatar
Stefano Belforte committed
198

199
200
201
202
203
204
205
206
207
208
209
210
echo "<h2>Check that scramv1 command is present</h2>"
echo "<pre>"
echo "scramv1 version"
scramv1 version
result=$?
echo "</pre>"
if [ $result != 0 ]
then
  echo "<strong><p>"
  echo "ERROR: scramv1 command not found"
  echo "</strong></p>"
  exit $SAME_ERROR
Stefano Belforte's avatar
Stefano Belforte committed
211
212
213
fi
echo "<p>"
echo "OK"
214
215
216
217
218
219
220
221
222
223
224
225
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
268
269
270
271
272
273
274
275
276
277
278
279
echo "</p>"

#cd $SAME_SENSOR_WORK
echo "<h2>Retrieve list of CMSSW versions installed</h2>"
for arch in $archs_defined
do
  export SCRAM_ARCH=$arch
  export BUILD_ARCH=$arch
  echo "<pre>"
  echo "Architecture: $arch"
  echo "scramv1 list -c CMSSW"
  scramv1 list -c CMSSW > scramv1_list_output.txt
  listerror=$?
  echo "</pre>"
  if [ $listerror != 0 ]
  then
    echo "<p>"
    echo "WARNING: scramv1 list error"
    echo "</p>"
  fi
  touch scramv1_list_output.txt
  cat scramv1_list_output.txt | tr -s " " | cut -d " " -f2 | sort -u > cmssw_installed_${arch}.txt
  cat cmssw_installed_${arch}.txt >> cmssw_installed_version_list.txt
  echo "<ol class=CMSSW-list id=\"$arch\">"
  if [ $listerror == 0 ] # don't try to parse the error message for CMSSW versions
  then
    cat cmssw_installed_${arch}.txt | while read line
    do
       echo "	<li>"$line"</li>"
    done
  fi
  echo "</ol>"
  echo "<p>"
  echo "OK"
  echo "</p>"
done

echo "<h2>Verify <a href="http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/COMP/CMSSAM/SiteTests/testjob/tests/cmssw_required_version_list.txt?view=co">list</a> of required CMSSW versions</h2>"
missing=0
failproject=0
failrunt=0
for cmsver in `cat $SAME_SENSOR_HOME/tests/cmssw_required_version_list.txt`
do
  grep -x $cmsver cmssw_installed_version_list.txt >& /dev/null
  result=$?
  if [ $result != 0 ]
  then
    echo "<p><strong>"
    echo "Required CMSSW version $cmsver not installed"
    echo "</strong></p>"
    missing=1
  else
    echo "<p>"
    echo "Checking version $cmsver installation"
    echo "</p>"
    echo "<pre>"
       # execute in a subprocess commands that require scram 
    $SAME_SENSOR_HOME/tests/TestCmsswVersion.sh $cmsver
    TestResult=$?
    if [ $TestResult != 0 ]
    then
	failproject=1
    fi
    echo "</pre>"
  fi
done
Stefano Belforte's avatar
Stefano Belforte committed
280

281
echo "<h2>Verify installed vs. published CMSSW versions</h2>"
Stefano Belforte's avatar
Stefano Belforte committed
282

283
284
285
286
287
288
289
# check that installed version list matches published tags
retrieve_published_list_fail=0
empty_tag_list=0
missing_arch_tag=0
missing_version_tag=0
missing_published_version=0
missing_production_release=0
Stefano Belforte's avatar
Stefano Belforte committed
290

291
echo "<p>Try various methods to find CE host name<p>"
Stefano Belforte's avatar
Stefano Belforte committed
292

293
294
295
if [ $isEGEE == 1 ]
then
  CE=`glite-brokerinfo getCE`
Stefano Belforte's avatar
Stefano Belforte committed
296
fi
297
298
299
if [ $isOSG == 1 ]
then
  CE=`grep 'name.*jobmanager' .BrokerInfo|cut -d'"' -f2`
Stefano Belforte's avatar
Stefano Belforte committed
300
fi
301
302
303
304
305
306
307
308
309
echo "BrokerInfo reported   : " $CE "<br>"
echo "possible env.variables<br>"
echo "GLITE_WMS_LOG_DESTINATION=" $GLITE_WMS_LOG_DESTINATION "<br>"
echo "GLOBUS_CE=              " $GLOBUS_CE "<br>"
BIH=`ls -l $SAME_HOME/.BrokerInfo 2>&1`
echo "BrokerInfo file in SAME_HOME=" $BIH "<br>"

if [ -z "$CE" ] ; then
    [ -n $GLITE_WMS_LOG_DESTINATION ] && CE=$GLITE_WMS_LOG_DESTINATION
310
311
fi

312
313
if [ -z "$CE" ] ; then
    [ -n $GLOBUS_CE ] && CE=$GLOBUS_CE
Stefano Belforte's avatar
Stefano Belforte committed
314
fi
Stefano Belforte's avatar
Stefano Belforte committed
315

316
317
318
319
320
321
322
323
324
325
326
if [ -z "$CE" ] ; then
  echo "<p>WARNING: Cannot derive CE name. After attempting: <br>"
  echo "<pre>"
  set -x
  glite-brokerinfo getCE
  grep 'name.*jobmanager' .BrokerInfo|cut -d'"' -f2
  echo $GLOBUS_CE
  echo $GLITE_WMS_LOG_DESTINATION
  set +x
  echo "</pre>"
  exit $SAME_WARNING
Stefano Belforte's avatar
Stefano Belforte committed
327
fi
Stefano Belforte's avatar
Stefano Belforte committed
328

329
330
ceHost=`echo $CE|cut -d':' -f1`
ceHostWithCommas=`echo $ceHost|tr . ,`
Stefano Belforte's avatar
Stefano Belforte committed
331
332

echo "<pre>"
333
334
echo "CE is:      "  $CE
echo "CE host is: "  $ceHost
Stefano Belforte's avatar
Stefano Belforte committed
335
336
echo "</pre>"

337
338
339
PublishedTagsURL="http://cmsdoc.cern.ch/cms/LCG/SiteComm/published-tags/$ceHostWithCommas"
echo "<p>Retrieve list of published tags from <a href=\"$PublishedTagsURL\">$PublishedTagsURL</a><br>"
./fetch-from-web $PublishedTagsURL publ_tag.txt
Stefano Belforte's avatar
Stefano Belforte committed
340
rc=$?
341
echo "rc from fetch-from-web = " $rc
Stefano Belforte's avatar
Stefano Belforte committed
342
343
[ $rc == $SAME_INFO ] && info=1
[ $rc == $SAME_NOTICE ] && note=1
344
[ $rc == $SAME_NOTICE ] && retrieve_published_list_fail=1 
Stefano Belforte's avatar
Stefano Belforte committed
345

346
347
echo "List of published tags<br><pre>"
cat publ_tag.txt
Stefano Belforte's avatar
Stefano Belforte committed
348
349
echo "</pre>"

350
351
352
353
354
355
356
357
358
359
if [ $retrieve_published_list_fail == 0 ]
then 
  len=`cat publ_tag.txt | wc --chars`
  if [ $len -lt 10 ]
  then
    empty_tag_list=1
    echo "<p><br><strong>"
    echo "Suspiciously small (empty ?) tag list returned by lcg-info"
    echo "</p></strong><pre>"
    ls -lh  publ_tag.txt
Stefano Belforte's avatar
Stefano Belforte committed
360
    echo "</pre>"
361
362
    retrieve_published_list_fail=1
    note=1
Stefano Belforte's avatar
Stefano Belforte committed
363
  fi
Stefano Belforte's avatar
Stefano Belforte committed
364
365
fi

366
367
368
369
370
371
372
if [ $retrieve_published_list_fail == 0 ]
then
  for arch in $archs_to_test
  do
    if ! (grep -q $arch publ_tag.txt) then
	echo "<p>ERROR: $arch tag missing</p>"
	missing_arch_tag=1
Stefano Belforte's avatar
Stefano Belforte committed
373
    fi
374
375
376
377
378
379
380
381
382
383
384
  done
  TagCollectorURL="https://cmstags.cern.ch/cgi-bin/CmsTC/ReleasesXML"
  echo "<p>Retrieve list of production version from <a href=\"$TagCollectorURL\">$TagCollectorURL</a> and ignore releases before 1_5_x<br>"
  ./fetch-from-web $TagCollectorURL ReleasesXML
  rc=$?
  echo "rc = " $rc
  [ $rc == $SAME_INFO ] && info=1
  if [ $rc == $SAME_NOTICE ]
  then
    note=1
    echo "<p>NOTICE: Fail to retrieve list of production versions from TagCollector/p>" 
Stefano Belforte's avatar
Stefano Belforte committed
385
  fi
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
  if [ $rc == $SAME_OK -o $rc == $SAME_INFO ] ; then
    cat ReleasesXML | grep Announced|cut -d'"' -f 2|sort -u > production_releases.txt
  # do not bother with old SL3-only versions (tags are not maintained)
    grep -v "CMSSW_0\|CMSSW_1_[0-4]" production_releases.txt > newer_releases
    mv newer_releases production_releases.txt
  fi
  
  echo "<h3>If a production releease is installed, it should be published</h3>"
  for cmsver in `cat cmssw_installed_version_list.txt`
    do
    if ( grep -qx $cmsver production_releases.txt )
    then
      if ! (grep -qx $cmsver publ_tag.txt)
      then
        echo "<p>"
	echo "WARNING: CMSSW version $cmsver installed but not published"
	echo "</p>"
	missing_version_tag=1
Stefano Belforte's avatar
Stefano Belforte committed
404
      fi
405
    fi
406
407
  done
  [ $missing_version_tag == 0 ] && echo "OK<p>"
Stefano Belforte's avatar
Stefano Belforte committed
408

409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
  echo "<h3>If a production release is published, it must be installed</h3>"
  for cmsver in `grep CMSSW publ_tag.txt`
  do
    if ( grep -qx $cmsver production_releases.txt )
    then
      if ! (grep -qx $cmsver cmssw_installed_version_list.txt)
      then
        echo "<p>"
	echo "ERROR: CMSSW version $cmsver published but not installed"
        echo "<pre>"
	set -x
	cat publ_tag.txt
	cat production_releases.txt
	set +x
        echo "</pre>"
	echo "</p>"
	missing_published_version=1
Stefano Belforte's avatar
Stefano Belforte committed
426
      fi
427
428
429
    fi
  done
  [ $missing_published_version == 0 ] && echo "OK<p>"
Stefano Belforte's avatar
Stefano Belforte committed
430

Stefano Belforte's avatar
Stefano Belforte committed
431

432
433
434
435
436
437
438
439
440
441
442
443
  echo "<h3>All production releases should be installed</h3>"
  for cmsver in `cat production_releases.txt`
    do
    if ! ( grep -qx $cmsver cmssw_installed_version_list.txt )
    then
      echo "<p>"
      echo "NOTICE: CMSSW production version $cmsver not installed"
      echo "</p>"
      missing_production_release=1
      fi
  done
  [ $missing_production_release == 0 ] && echo "OK<p>"
Stefano Belforte's avatar
Stefano Belforte committed
444

445
fi
Stefano Belforte's avatar
Stefano Belforte committed
446

447
448
449
450
451
452
453
454
455
456
457
if [ $isEGEE == 1 ] ; then
    # Determine shared software area
    echo "<h2>Shared Software Area</h2>"
    echo "The software area $SW_DIR is used by the following CEs:"
    SHARED_PATH=$SW_DIR/shared_sw_area
    mkdir -p $SHARED_PATH
    touch $SHARED_PATH/$ceHost
    echo "<ul class=CMSSW_shared_areas>"
    # list all files that have been modified/touched in the last 5 days
    find $SHARED_PATH -mtime -5 -type f -printf '<li>%P</li>\n'
    echo "</ul>"
Stefano Belforte's avatar
Stefano Belforte committed
458
459
fi

460
461
462
# Print out installed Generator Gridpacks
# We assume that they are stored in $CMS_PATH/slc4_ia32_gcc345/generatorData
# SAM test result does not depend on it (at least for now).
Stefano Belforte's avatar
Stefano Belforte committed
463

464
465
466
467
468
echo "<h2>Installed Generator Gridpacks</h2>"
if [ ! -d $CMS_PATH/slc4_ia32_gcc345/generatorData ]; then
  echo "<p>"
  echo " WARNING: No generator data installed!"
  echo "</p>"
Stefano Belforte's avatar
Stefano Belforte committed
469
else
470
471
472
473
474
475
476
477
478
  cd  $CMS_PATH/slc4_ia32_gcc345/generatorData
  echo "Following generator data are installed: "
  echo "<pre>"
  find . -type d -mindepth 4 -maxdepth 4 -print
  echo "</pre>"
# Bad permssions - enable later...
#  echo "Files or directories with bad permissions" 
#  find . -type d ! -perm -o+x -print 
#  find . -type f ! -perm -o+r -print
Stefano Belforte's avatar
Stefano Belforte committed
479
fi
Stefano Belforte's avatar
Stefano Belforte committed
480

481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
echo "<h3>cms-common RPMs</h3>"
APTINIT=`find $SW_DIR/slc4_ia32_gcc345/external/apt -name init.sh`
source $APTINIT
echo "<pre>"
echo -n "SL4 RPM: "
rpm -qa | grep cms-common
echo "</pre>"
if [ -d $SW_DIR/slc5_ia32_gcc434 ]; then
    APTINIT=`find $SW_DIR/slc5_ia32_gcc434/external/apt -name init.sh`
    source $APTINIT
    echo "<pre>"
    echo -n "SL5 RPM: "
    rpm -qa | grep cms-common
    echo "</pre>"
fi

Stefano Belforte's avatar
Stefano Belforte committed
497

498
499
500
501
502
503
504
505
506
507
508
509
510
echo '<h1><a name="summary"> Test Summary</a></h1><p>'

if [ $retrieve_published_list_fail == 1 ]
then
  echo "<p>NOTICE: Fail to retrieve list of published tags from cmsdoc</p>"
  note=1
fi

if [ $missing_production_release == 1 ]
then
  echo "<p>NOTICE: One or more production releases are not installed</p>"
  notice=1
fi
Stefano Belforte's avatar
Stefano Belforte committed
511

512
513
514
515
516
if [ $cantwrite == 1 ]
then
  echo "<p>WARNING: Cannot write to CMSSW installation area</p>"
  warning=1
fi
Stefano Belforte's avatar
Stefano Belforte committed
517

518
519
520
521
522
if [ $missing == 1 ]
then
  echo "<p>WARNING: Some of the required CMSSW versions not found</p>"
  warning=1
fi
Stefano Belforte's avatar
Stefano Belforte committed
523

524
525
526
527
528
if [ $empty_tag_list == 1 ]
then
  echo "<p>WARNING: No CMS tags are published</p>"
  warning=1
fi
Stefano Belforte's avatar
Stefano Belforte committed
529

530
531
532
533
534
if [ $missing_version_tag == 1 ]
then
  echo "<p>WARNING: Some CMS VO Tags are missing</p>"
  warning=1
fi
Stefano Belforte's avatar
Stefano Belforte committed
535

536
537
538
539
540
if [ $missing_arch_tag == 1 ]
then
  echo "<p>ERROR: Needed CMS VO architecture TAG not published</p>"
  error=1
fi
Stefano Belforte's avatar
Stefano Belforte committed
541

542
543
544
545
546
if [ $missing_published_version == 1 ]
then
  echo "<p>ERROR: Some CMSSW version published but not present</p>"
  error=1
fi
Stefano Belforte's avatar
Stefano Belforte committed
547

548
549
550
551
552
if [[ $failproject == 1  ||  $failrunt == 1 ]]
then
  echo "<p>Some of the required CMSSW versions not working</p>"
  error=1
fi
Stefano Belforte's avatar
Stefano Belforte committed
553
554


555
if [[ $error == 1 ]]
Stefano Belforte's avatar
Stefano Belforte committed
556
557
558
559
560
then
  echo "<p><strong> ERROR </strong></p>"
  exit $SAME_ERROR
fi

561
if [[ $warning == 1 ]]
Stefano Belforte's avatar
Stefano Belforte committed
562
563
564
565
566
then
  echo "<p><strong> WARNING </strong></p>"
  exit $SAME_WARNING
fi

567
if [ $notice == 1 ]
Stefano Belforte's avatar
Stefano Belforte committed
568
569
570
571
572
573
574
575
576
577
578
579
580
581
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