Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
#!/bin/sh

function die { echo $1: status $2 ; exit $2; }
function checkDiff {
    FSIZE=$(stat -c%s "$1")
    echo "The output diff is $FSIZE:"
    cat $1;
    if [ $FSIZE -gt 500 ]
    then
	exit -1;
    fi
}

echo " testing Geometry/TrackerGeomtryBuilder"

for entry in "${SCRAM_TEST_PATH}/python"/test*
do
  echo "===== Test \"cmsRun $entry \" ===="
  (cmsRun $entry) || die "Failure using cmsRun $entry" $?
done

cmsRun ${SCRAM_TEST_PATH}/python/testPixelTopologyMapTest_cfg.py runNumber=300000  || die "Failure using cmsRun testPixelTopologyMapTest_cfg.py runNumber=300000" $?
cmsRun ${SCRAM_TEST_PATH}/python/testPixelTopologyMapTest_cfg.py globalTag=auto:phase2_realistic_T33  || die "Failure using cmsRun testPixelTopologyMapTest_cfg.py globalTag=auto:phase2_realistic_T33" $?

FILE1=trackerParametersDD4hep.log
FILE2=trackerParametersDDD.log
FILE3=diff.log

echo "===== Compare Tracker Parameters for DD and DD4hep ===="
(diff -B -w $FILE1 $FILE2 >& $FILE3;
    [ -s $FILE3 ] && checkDiff $FILE3 || echo "OK") || die "Failure comparing Tracker Parameters for DD and DD4hep" $?