Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-01-11 03:38:27

0001 #!/bin/sh -ex
0002 # Pass in name and status
0003 function die { echo $1: status $2 ;  exit $2; }
0004 
0005 LOCAL_TEST_DIR=${SCRAM_TEST_PATH}
0006 
0007 #test reading of the old format files
0008 IOPoolInputData=$CMSSW_BASE/src
0009 for dir in $(echo $CMSSW_SEARCH_PATH | tr : '\n') ;  do
0010   if [ -d ${dir}/IOPool/Input/data ] ; then
0011     IOPoolInputData=${dir}
0012     break
0013   fi
0014 done
0015 
0016 for file in ${IOPoolInputData}/IOPool/Input/data/raw*.root
0017 do
0018   cmsRun ${LOCAL_TEST_DIR}/test_old_raw_data_step1_cfg.py "$file" || die "Failed to read old raw data file $file" $?
0019   cmsRun ${LOCAL_TEST_DIR}/test_old_raw_data_step2_cfg.py || die "Failed to read raw data file converted from $file" $?
0020   rm -fr converted.root
0021 done
0022 
0023 for file in ${IOPoolInputData}/IOPool/Input/data/old*.root
0024 do
0025   cmsRun ${LOCAL_TEST_DIR}/test_old_formats_cfg.py "$file" || die "Failed to read old file $file" $?
0026 done
0027 
0028 for file in ${IOPoolInputData}/IOPool/Input/data/empty*.root
0029 do
0030   cmsRun ${LOCAL_TEST_DIR}/test_empty_old_formats_cfg.py "$file" || die "Failed to read old empty file $file" $?
0031 done
0032 
0033 # Note that the expected sequence of runs, lumis, and events changed slightly at 3_8_0 so
0034 # a different test config is required to run the following test for earlier releases. 
0035 for file in ${IOPoolInputData}/IOPool/Input/data/complex*.root
0036 do
0037   case $file in
0038   "${IOPoolInputData}/IOPool/Input/data/complex_old_format_CMSSW_2_2_13.root" | "${IOPoolInputData}/IOPool/Input/data/complex_old_format_CMSSW_3_5_0.root" | "${IOPoolInputData}/IOPool/Input/data/complex_old_format_CMSSW_3_7_0.root")
0039   script=test_complex_before_3_8_0_cfg.py
0040   ;;
0041   *)
0042   script=test_complex_old_formats_cfg.py
0043   ;;
0044   esac
0045   cmsRun ${LOCAL_TEST_DIR}/$script "$file" || die "Failed to read old complex file $file" $?
0046 done
0047 
0048 cmsRun ${LOCAL_TEST_DIR}/test_merge_two_files.py ${IOPoolInputData}/IOPool/Input/data/complex_old_format_CMSSW_4_2_7.root ${IOPoolInputData}/IOPool/Input/data/complex_old_format_CMSSW_4_2_8.root || die 'Failure using test_merge_two_files.py' $?
0049 
0050 cmsRun ${LOCAL_TEST_DIR}/test_reduced_ProcessHistory_cfg.py merged_files.root || die 'Failure using test_reduced_ProcessHistory_cfg.py' $?
0051 
0052 cmsRun ${LOCAL_TEST_DIR}/test_reduced_ProcessHistory_dup_cfg.py merged_files.root || die 'Failure using test_reduced_ProcessHistory_dup_cfg.py' $?
0053 
0054 cmsRun ${LOCAL_TEST_DIR}/test_reduced_ProcessHistory_end_cfg.py merged_files.root || die 'Failure using test_reduced_ProcessHistory_end_cfg.py' $?