Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:07:57

0001 #!/bin/sh
0002 
0003 function die { echo $1: status $2 ; exit $2; }
0004 function checkDiff {
0005     FSIZE=$(stat -c%s "$1")
0006     echo "The output diff is $FSIZE:"
0007     cat $1;
0008     if [ $FSIZE -gt 2000 ]
0009     then
0010         exit -1;
0011     fi
0012 }
0013 
0014 F1=${LOCAL_TEST_DIR}/python/validateDTGeometry_cfg.py
0015 F2=${LOCAL_TEST_DIR}/python/testDTGeometry.py
0016 FILE1=${LOCAL_TEST_DIR}/dtGeometry.log.org
0017 FILE2=dtGeometry.log
0018 FILE3=diff.log
0019 FILE4=dtGeometryFiltered.log
0020 
0021 echo " testing Geometry/DTGeometryBuilder"
0022 
0023 export tmpdir=${LOCAL_TMP_DIR:-/tmp}
0024 # The following test does not work with DD4hep with Geant4 units
0025 # echo "===== Test \"cmsRun validateDTGeometry_cfg.py\" ===="
0026 # (cmsRun $F1) || die "Failure using cmsRun $F1" $?
0027 echo "===== Test \"cmsRun testDTGeometry.py\" ===="
0028 (cmsRun $F2;
0029     grep -v 'Benchmark ' $FILE2 | grep -v '^ *[1-9]' | grep -v '%MSG-i' | grep -v '^Info '>& $FILE4;
0030     diff -B -w $FILE1 $FILE4 >& $FILE3;
0031     [ -s $FILE3 ] && checkDiff $FILE3 || echo "OK") || die "Failure using cmsRun $F2" $?