File indexing completed on 2024-04-06 12:19:09
0001
0002
0003 function die { echo $1: status $2 ; exit $2; }
0004
0005 SCRAM_TEST_NAME=TestIOPoolInputNoParentDictionary
0006 rm -rf $SCRAM_TEST_NAME
0007 mkdir $SCRAM_TEST_NAME
0008 cd $SCRAM_TEST_NAME
0009
0010
0011 NEW_CMSSW_BASE=$(/bin/pwd -P)/$CMSSW_VERSION
0012 scram -a $SCRAM_ARCH project $CMSSW_VERSION
0013 pushd $CMSSW_VERSION/src
0014
0015
0016 for DIR in ${CMSSW_BASE} ${CMSSW_RELEASE_BASE} ${CMSSW_FULL_RELEASE_BASE} ; do
0017 if [ -d ${DIR}/src/DataFormats/TestObjects ]; then
0018 mkdir DataFormats
0019 cp -Lr ${DIR}/src/DataFormats/TestObjects DataFormats/
0020 break
0021 fi
0022 done
0023 if [ ! -e DataFormats/TestObjects ]; then
0024 echo "Failed to copy DataFormats/TestObjects from local or release area"
0025 exit 1;
0026 fi
0027
0028
0029 cat DataFormats/TestObjects/test/BuildFile_extra.xml >> DataFormats/TestObjects/test/BuildFile.xml
0030
0031 (eval $(scram run -sh) ; scram build -j $(nproc))
0032
0033 popd
0034
0035
0036 export LD_LIBRARY_PATH=${NEW_CMSSW_BASE}/lib/${SCRAM_ARCH}:${LD_LIBRARY_PATH}
0037 export ROOT_INCLUDE_PATH=${NEW_CMSSW_BASE}/src:${ROOT_INCLUDE_PATH}
0038
0039 echo "Produce a file with TransientIntParentT<1> product"
0040 cmsRun ${LOCALTOP}/src/IOPool/Input/test/PoolNoParentDictionaryTestStep1_cfg.py || die 'Failed cmsRun PoolNoParentDictionaryTestStep1_cfg.py' $?
0041
0042
0043
0044 echo "PREVENT_HEADER_PARSING" >> ${NEW_CMSSW_BASE}/src/DataFormats/TestObjects/interface/ToyProducts.h
0045 rm ${NEW_CMSSW_BASE}/lib/${SCRAM_ARCH}/DataFormatsTestObjectsParent1_xr_rdict.pcm ${NEW_CMSSW_BASE}/lib/${SCRAM_ARCH}/libDataFormatsTestObjectsParent1.so
0046 sed -i -e 's/libDataFormatsTestObjectsParent1.so/libDataFormatsTestObjectsParent2.so/' ${NEW_CMSSW_BASE}/lib/${SCRAM_ARCH}/DataFormatsTestObjectsParent1_xr.rootmap
0047
0048 echo "Read the file without TransientIntParentT<1> dictionary"
0049 cmsRun ${LOCALTOP}/src/IOPool/Input/test/PoolNoParentDictionaryTestStep2_cfg.py || die 'Failed cmsRun PoolNoParentDictionaryTestStep2_cfg.py' $?