Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-05-14 00:30:02

0001 #!/bin/bash
0002 function die { echo $1: status $2; exit $2; }
0003 
0004 if [ "${SCRAM_TEST_NAME}" != "" ] ; then
0005   mkdir ${SCRAM_TEST_NAME}
0006   cd ${SCRAM_TEST_NAME}
0007 fi
0008 
0009 clean_up(){
0010     echo "cleaning the local test area"
0011     rm -fr milleBinary00* 
0012     rm -fr pedeSteer* 
0013     rm -fr millepede.*
0014     rm -fr *.root
0015     rm -fr *.log
0016     rm -fr *.dat
0017     rm -fr *.tar
0018     rm -fr *.gz
0019     rm -fr *.db
0020 }
0021 
0022 if test -f "milleBinary*"; then
0023     clean_up
0024 fi
0025 
0026 pwd
0027 echo " testing Aligment/MillePedeAlignmentAlgorithm"
0028 
0029 REMOTE="/store/group/alca_global/tkal_millepede_tests/"
0030 TESTPACKAGE="test_pede_package_v1"
0031 COMMMAND=`xrdfs cms-xrd-global.cern.ch locate ${REMOTE}${TESTPACKAGE}.tar`
0032 STATUS=$?
0033 echo "xrdfs command status = "$STATUS
0034 if [ $STATUS -eq 0 ]; then
0035     echo "Using file ${TESTPACKAGE}. Running in ${LOCAL_TEST_DIR}."
0036     xrdcp root://cms-xrd-global.cern.ch/${REMOTE}${TESTPACKAGE}.tar .
0037     tar -xvf ${TESTPACKAGE}.tar
0038     mv ${TESTPACKAGE}/milleBinary* .
0039     mv ${TESTPACKAGE}/alignment_input.db .
0040     gunzip milleBinary*
0041     (cmsRun ${LOCAL_TEST_DIR}/test_pede.py) || die 'failed running test_pede.py' $?
0042     echo -e "\n @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
0043     echo -e " @ MillePede Exit Status: "`cat millepede.end`
0044     echo -e " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
0045     ## mv the output file to the local test directory for the subsequent payload sanity check
0046     mv alignments_MP.db ${LOCAL_TEST_DIR}
0047     ## clean the house now...
0048     clean_up
0049 else 
0050   die "SKIPPING test, file ${TESTPACKAGE}.tar not found" 0
0051 fi