Skip to content

Commit

Permalink
Update unit tests so they will pass
Browse files Browse the repository at this point in the history
These unit tests compare log files and fail
when the new warning listing configured legacy
modules is added.
  • Loading branch information
wddgit committed Jul 21, 2021
1 parent 8b4562f commit 82fc9f2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
7 changes: 4 additions & 3 deletions FWCore/Integration/test/run_TestGetBy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,20 @@ pushd ${LOCAL_TMP_DIR}

echo "testGetBy1"
cmsRun -p ${LOCAL_TEST_DIR}/${test}1_cfg.py > testGetBy1.log 2>/dev/null || die "cmsRun ${test}1_cfg.py" $?
diff ${LOCAL_TEST_DIR}/unit_test_outputs/testGetBy1.log testGetBy1.log || die "comparing testGetBy1.log" $?
grep -v "LegacyModules" testGetBy1.log > testGetBy1_1.log
diff ${LOCAL_TEST_DIR}/unit_test_outputs/testGetBy1.log testGetBy1_1.log || die "comparing testGetBy1.log" $?

echo "testGetBy2"
cmsRun -p ${LOCAL_TEST_DIR}/${test}2_cfg.py > testGetBy2.log 2>/dev/null || die "cmsRun ${test}2_cfg.py" $?
grep -v "Initiating request to open file" testGetBy2.log | grep -v "Successfully opened file" | grep -v "Closed file" > testGetBy2_1.log
grep -v 'Initiating request to open file\|Successfully opened file\|Closed file\|LegacyModules' testGetBy2.log > testGetBy2_1.log
diff ${LOCAL_TEST_DIR}/unit_test_outputs/testGetBy2.log testGetBy2_1.log || die "comparing testGetBy2.log" $?

echo "testGetBy3"
cmsRun -p ${LOCAL_TEST_DIR}/${test}3_cfg.py || die "cmsRun ${test}3_cfg.py" $?

echo "testConsumesInfo"
cmsRun -p ${LOCAL_TEST_DIR}/testConsumesInfo_cfg.py > testConsumesInfo.log 2>/dev/null || die "cmsRun testConsumesInfo_cfg.py" $?
grep -v "++" testConsumesInfo.log > testConsumesInfo_1.log
grep -v '++\|LegacyModules' testConsumesInfo.log > testConsumesInfo_1.log
rm testConsumesInfo.log
rm testConsumesInfo.root
diff ${LOCAL_TEST_DIR}/unit_test_outputs/testConsumesInfo_1.log testConsumesInfo_1.log || die "comparing testConsumesInfo_1.log" $?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ For products only read from previous processes, 'skip current process' is added
EndPathStatusInserter/'e'
EndPathStatusInserter/'p1ep2'

The following legacy modules are configured. Support for legacy modules
is going to end soon. These modules need to be converted to have type
edm::global, edm::stream, edm::one, or in rare cases edm::limited.
IntVectorProducer intVectorProducer
%MSG
Process name = PROD2
paths:
path1
Expand Down
5 changes: 5 additions & 0 deletions FWCore/Integration/test/unit_test_outputs/testGetBy1.log
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ Module type=IntProducer, Module label=intProducerA, Parameter Set ID=38971365e81
++++ finished: constructing module with label 'intVectorProducer' id = 14
++ preallocate: 1 concurrent runs, 1 concurrent luminosity sections, 1 streams
++ starting: begin job
The following legacy modules are configured. Support for legacy modules
is going to end soon. These modules need to be converted to have type
edm::global, edm::stream, edm::one, or in rare cases edm::limited.
IntVectorProducer intVectorProducer
%MSG
++++ starting: begin job for module with label 'intProducerA' id = 9
Module type=IntProducer, Module label=intProducerA, Parameter Set ID=38971365e8174cb2ccc12430661ba6d4
++++ finished: begin job for module with label 'intProducerA' id = 9
Expand Down
5 changes: 5 additions & 0 deletions FWCore/Integration/test/unit_test_outputs/testGetBy2.log
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ Module type=IntProducer, Module label=intProducer, Parameter Set ID=0e62dace196e
++++ finished: constructing module with label 'intVectorProducer' id = 7
++ preallocate: 1 concurrent runs, 1 concurrent luminosity sections, 1 streams
++ starting: begin job
The following legacy modules are configured. Support for legacy modules
is going to end soon. These modules need to be converted to have type
edm::global, edm::stream, edm::one, or in rare cases edm::limited.
IntVectorProducer intVectorProducer
%MSG
++++ starting: begin job for module with label 'intProducerU' id = 6
++++ finished: begin job for module with label 'intProducerU' id = 6
++++ starting: begin job for module with label 'intVectorProducer' id = 7
Expand Down

0 comments on commit 82fc9f2

Please sign in to comment.