@@ -14,25 +14,31 @@ LOCAL_TEST_DIR=${SCRAM_TEST_PATH}
1414# test code is actually working properly and if we see failures
1515# in the later cmsRun processes, they are more likely to be
1616# caused by a failure in ROOT schema evolution.
17- cmsRun ${LOCAL_TEST_DIR} /SchemaEvolution_create_test_file_cfg.py || die ' Failure using SchemaEvolution_create_test_file_cfg.py' $?
18- cmsRun ${LOCAL_TEST_DIR} /SchemaEvolution_test_read_cfg.py || die ' Failure using SchemaEvolution_create_test_file_cfg.py' $?
17+ cmsRun ${LOCAL_TEST_DIR} /SchemaEvolution_create_test_file_cfg.py --splitLevel 0 || die ' Failure using SchemaEvolution_create_test_file_cfg.py splitLevel 0' $?
18+ cmsRun ${LOCAL_TEST_DIR} /SchemaEvolution_test_read_cfg.py --inputFile SchemaEvolutionTest_splitLevel0.root || die ' Failure using SchemaEvolution_create_test_file_cfg.py splitLevel 0' $?
19+
20+ cmsRun ${LOCAL_TEST_DIR} /SchemaEvolution_create_test_file_cfg.py --splitLevel 99 || die ' Failure using SchemaEvolution_create_test_file_cfg.py splitLevel 99' $?
21+ cmsRun ${LOCAL_TEST_DIR} /SchemaEvolution_test_read_cfg.py --inputFile SchemaEvolutionTest_splitLevel99.root || die ' Failure using SchemaEvolution_create_test_file_cfg.py splitLevel 99' $?
22+
1923
2024# For each StreamerInfo in the input file, test for existence of StreamerInfo for
2125# nested classes (members, base, elements of containers).
22- root.exe -b -l -q file:SchemaEvolutionTest.root " ${LOCAL_TEST_DIR} /testForStreamerInfo.C(gFile)" | sort -u > testForStreamerInfo1.log
23- grep " Missing" testForStreamerInfo1.log && die " Missing nested streamer info" 1
24- grep " SchemaEvolutionChangeOrder" testForStreamerInfo1.log || die ' Failure cannot find SchemaEvolutionChangeOrder in testForStreamerInfo1.log' $?
25- grep " SchemaEvolutionAddMember" testForStreamerInfo1.log || die ' Failure cannot find SchemaEvolutionAddMember in testForStreamerInfo1.log' $?
26- grep " SchemaEvolutionRemoveMember" testForStreamerInfo1.log || die ' Failure cannot find SchemaEvolutionRemoveMember in testForStreamerInfo1.log' $?
27- grep " SchemaEvolutionMoveToBase" testForStreamerInfo1.log || die ' Failure cannot find SchemaEvolutionMoveToBase" in testForStreamerInfo1.log' $?
28- grep " SchemaEvolutionChangeType" testForStreamerInfo1.log || die ' Failure cannot find SchemaEvolutionChangeType in testForStreamerInfo1.log' $?
29- grep " SchemaEvolutionAddBase" testForStreamerInfo1.log || die ' Failure cannot find SchemaEvolutionAddBase in testForStreamerInfo1.log' $?
30- grep " SchemaEvolutionPointerToMember" testForStreamerInfo1.log || die ' Failure cannot find SchemaEvolutionPointerToMember in testForStreamerInfo1.log' $?
31- grep " SchemaEvolutionPointerToUniquePtr" testForStreamerInfo1.log || die ' Failure cannot find SchemaEvolutionPointerToUniquePtr in testForStreamerInfo1.log' $?
32- grep " SchemaEvolutionCArrayToStdArray" testForStreamerInfo1.log || die ' Failure cannot find SchemaEvolutionCArrayToStdArray in testForStreamerInfo1.log' $?
33- grep " SchemaEvolutionVectorToList" testForStreamerInfo1.log || die ' Failure cannot find SchemaEvolutionVectorToList in testForStreamerInfo1.log' $?
34- grep " SchemaEvolutionMapToUnorderedMap" testForStreamerInfo1.log || die ' Failure cannot find SchemaEvolutionMapToUnorderedMap in testForStreamerInfo1.log' $?
35- grep " VectorVectorElementNonSplit" testForStreamerInfo1.log || die ' Failure cannot find VectorVectorElementNonSplit in testForStreamerInfo1.log' $?
26+ for SPLIT in 0 99; do
27+ root.exe -b -l -q file:SchemaEvolutionTest_splitLevel${SPLIT} .root " ${LOCAL_TEST_DIR} /testForStreamerInfo.C(gFile)" | sort -u > testForStreamerInfo_${SPLIT} .log
28+ grep " Missing" testForStreamerInfo_${SPLIT} .log && die " Missing nested streamer info" 1
29+ grep " SchemaEvolutionChangeOrder" testForStreamerInfo_${SPLIT} .log || die ' Failure cannot find SchemaEvolutionChangeOrder in testForStreamerInfo_${SPLIT}.log' $?
30+ grep " SchemaEvolutionAddMember" testForStreamerInfo_${SPLIT} .log || die ' Failure cannot find SchemaEvolutionAddMember in testForStreamerInfo_${SPLIT}.log' $?
31+ grep " SchemaEvolutionRemoveMember" testForStreamerInfo_${SPLIT} .log || die ' Failure cannot find SchemaEvolutionRemoveMember in testForStreamerInfo_${SPLIT}.log' $?
32+ grep " SchemaEvolutionMoveToBase" testForStreamerInfo_${SPLIT} .log || die ' Failure cannot find SchemaEvolutionMoveToBase" in testForStreamerInfo_${SPLIT}.log' $?
33+ grep " SchemaEvolutionChangeType" testForStreamerInfo_${SPLIT} .log || die ' Failure cannot find SchemaEvolutionChangeType in testForStreamerInfo_${SPLIT}.log' $?
34+ grep " SchemaEvolutionAddBase" testForStreamerInfo_${SPLIT} .log || die ' Failure cannot find SchemaEvolutionAddBase in testForStreamerInfo_${SPLIT}.log' $?
35+ grep " SchemaEvolutionPointerToMember" testForStreamerInfo_${SPLIT} .log || die ' Failure cannot find SchemaEvolutionPointerToMember in testForStreamerInfo_${SPLIT}.log' $?
36+ grep " SchemaEvolutionPointerToUniquePtr" testForStreamerInfo_${SPLIT} .log || die ' Failure cannot find SchemaEvolutionPointerToUniquePtr in testForStreamerInfo_${SPLIT}.log' $?
37+ grep " SchemaEvolutionCArrayToStdArray" testForStreamerInfo_${SPLIT} .log || die ' Failure cannot find SchemaEvolutionCArrayToStdArray in testForStreamerInfo_${SPLIT}.log' $?
38+ grep " SchemaEvolutionVectorToList" testForStreamerInfo_${SPLIT} .log || die ' Failure cannot find SchemaEvolutionVectorToList in testForStreamerInfo_${SPLIT}.log' $?
39+ grep " SchemaEvolutionMapToUnorderedMap" testForStreamerInfo_${SPLIT} .log || die ' Failure cannot find SchemaEvolutionMapToUnorderedMap in testForStreamerInfo_${SPLIT}.log' $?
40+ grep " VectorVectorElementNonSplit" testForStreamerInfo_${SPLIT} .log || die ' Failure cannot find VectorVectorElementNonSplit in testForStreamerInfo_${SPLIT}.log' $?
41+ done
3642
3743# Then we read permanently saved data files from the cms-data
3844# repository. When these data files were written, the working area
@@ -79,19 +85,27 @@ grep "VectorVectorElementNonSplit" testForStreamerInfo1.log || die 'Failure cann
7985# Then rebuild the working area.
8086#
8187# Then run the configuration IOPool/Input/test/SchemaEvolution_create_test_file_cfg.py
82- # This will generate an output file named SchemaEvolutionTest.root.
88+ # twice: with arguments' --splitLevel 0' and '--splitLevel 99'
89+ # This will generate an output file named SchemaEvolutionTest_splitLevel<N>.root.
8390# Rename this file appropriately to include the release used and use
8491# it as an input for this test by adding additional cases below.
8592# The new data file will need to added to the cms-data repository
8693# named IOPool-Input.
8794
88- file=SchemaEvolutionTestOLD13_2_3.root
95+ file=SchemaEvolutionTestOLD15_1_0_pre5_splitLevel0.root
96+ inputfile=$( edmFileInPath IOPool/Input/data/$file ) || die " Failure edmFileInPath IOPool/Input/data/$file " $?
97+ cmsRun ${LOCAL_TEST_DIR} /SchemaEvolution_test_read_cfg.py --inputFile " $inputfile " || die " Failed to read old file $file " $?
98+
99+ file=SchemaEvolutionTestOLD15_1_0_pre5_splitLevel99.root
89100inputfile=$( edmFileInPath IOPool/Input/data/$file ) || die " Failure edmFileInPath IOPool/Input/data/$file " $?
90101cmsRun ${LOCAL_TEST_DIR} /SchemaEvolution_test_read_cfg.py --inputFile " $inputfile " || die " Failed to read old file $file " $?
91102
92103file=SchemaEvolutionTestOLD13_0_0.root
93104inputfile=$( edmFileInPath IOPool/Input/data/$file ) || die " Failure edmFileInPath IOPool/Input/data/$file " $?
94105
106+
107+ # # Note that the following two tests exercise implicitly only split level 99
108+
95109# The next test demonstrates the FileReadError that can occur as a
96110# result of the known ROOT bug in 13_0_0 (file has a problem when
97111# written with 13_0_0 that causes an exception when read).
0 commit comments