Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[13.3.X] Fix DQMOfflineConfiguration unit tests #43664

Merged
merged 2 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DQMOffline/Configuration/test/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<test name="GetTestDQMOfflineConfigurationFile" command="edmCopyUtil ${INFILE} $(LOCALTOP)/tmp/"/>

<!-- To make the tests run in parallel, we chunk up the work into arbitrary sets of 10 sequences. -->
<test name="TestDQMOfflineConfiguration" command="runtests.sh ${step_value} ${value} file://${LOCALTOP}/tmp/${INFILE_NAME}" for="0,290,10">
<test name="TestDQMOfflineConfiguration" command="runtests.sh ${step_value} ${value} file://${LOCALTOP}/tmp/${INFILE_NAME}" for="0,300,10">
<flags PRE_TEST="GetTestDQMOfflineConfigurationFile"/>
</test>

<!-- To make sure we actually got all sequences, the last check checks that there are no sequences beyond the last test -->
<!-- This might need to updated when the number of distinct sequences grows, add more rows above and change the number here. -->
<test name="TestDQMOfflineConfigurationGotAll" command="cmsswSequenceInfo.py --runTheMatrix --steps DQM,VALIDATION --infile file://${LOCALTOP}/tmp/${INFILE_NAME} --limit 50 --offset 300 --threads 1 | grep 'Analyzing 0 seqs'">
<test name="TestDQMOfflineConfigurationGotAll" command="runrest.sh file://${LOCALTOP}/tmp/${INFILE_NAME} 310">
<flags PRE_TEST="GetTestDQMOfflineConfigurationFile"/>
</test>
12 changes: 12 additions & 0 deletions DQMOffline/Configuration/test/runrest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash -ex
ERR=0
PYTHONUNBUFFERED=1 cmsswSequenceInfo.py --runTheMatrix --steps DQM,VALIDATION --infile $1 --offset $2 --dbfile sequences$2.db --threads 1 >run.log 2>&1 || ERR=1
cat run.log
seqs=$(grep 'Analyzing [0-9][0-9]* seqs' run.log | sed 's|.*Analyzing *||;s| .*||')
echo "Sequences run by final DQMOfflineConfiguration: $seqs"
if [ "$seqs" -gt 0 ] ; then
echo "Final DQMOfflineConfiguration should not run any sequences."
echo "Please update parameters for TestDQMOfflineConfiguration unittest to run the extra sequences."
exit 1
fi
exit $ERR