Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:11

0001 #!/bin/sh
0002 
0003 SETCOLOR_SUCCESS="echo -en \\033[1;32m"
0004 SETCOLOR_FAILURE="echo -en \\033[1;31m"
0005 SETCOLOR_NORMAL="echo -en \\033[0;39m"
0006 
0007 echo_success() {
0008   echo -n " [  "
0009   $SETCOLOR_SUCCESS
0010   echo -n $"OK"
0011   $SETCOLOR_NORMAL
0012   echo "  ]"
0013 #  echo -ne "\r"
0014   return 0
0015 }
0016 
0017 echo_failure() {
0018   echo -n "[  "
0019   $SETCOLOR_FAILURE
0020   echo -n $"KO"
0021   $SETCOLOR_NORMAL
0022   echo "  ]"
0023 #  echo -ne "\r"
0024   return 0
0025 }
0026 
0027 eval `scramv1 runtime -sh`
0028 echo -n "Dumping ECAL fake conditions..."
0029 cmsRun data/print_obj_fake.cfg  > print_obj_fake.stdout 2> print_obj_fake.stderr 
0030 test $? -ne 0 && echo -n "Some problems dumping the conditions. cmsRun return value different from zero" && echo_failure && exit 1 
0031 test `wc -l print_obj_fake.stdout | awk '{print $1}'` -lt 60000 && echo -n "Some problems with the conditions. Dump file too short" && echo_failure && exit 2  
0032 echo_success
0033 echo -n "Dumping ECAL frontier conditions..."
0034 cmsRun data/print_obj_frontier.cfg  > print_obj_frontier.stdout 2> print_obj_frontier.stderr 
0035 test $? -ne 0 && echo -n "Some problems dumping the conditions. cmsRun return value different from zero" && echo_failure && exit 3 
0036 echo_success
0037 
0038 DIFF=`diff print_obj_fake.stdout print_obj_frontier.stdout`
0039 if [ "X$DIFF" = "X" ]; then
0040     echo -n "Fake Conditions correctly loaded into DB" && echo_success
0041     rm -rf print_obj_fake.stdout print_obj_fake.stderr print_obj_frontier.stdout print_obj_frontier.stderr
0042     exit 0
0043 else
0044     echo $DIFF
0045     echo_failure
0046     exit 4
0047 fi
0048 
0049