-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unit tests for hltPrintMenuVersions and hltMenuContentToCSVs
- Loading branch information
Showing
5 changed files
with
73 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test*log* | ||
*.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
<!-- test access to EDM files used in HLT-AddOnTests and HLT-Validation tests --> | ||
<test name="testAccessToEDMInputsOfHLTTests" command="testAccessToEDMInputsOfHLTTests.sh"/> | ||
|
||
<!-- test script hltPrintMenuVersions --> | ||
<test name="test_hltPrintMenuVersions" command="test_hltPrintMenuVersions.sh"/> | ||
|
||
<!-- test script hltMenuContentToCSVs --> | ||
<test name="test_hltMenuContentToCSVs" command="test_hltMenuContentToCSVs.sh"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
# Pass in name and status | ||
function die { | ||
printf "\n%s: status %s\n" "$1" "$2" | ||
if [ $# -gt 2 ]; then | ||
printf "%s\n" "=== Log File ==========" | ||
cat $3 | ||
printf "%s\n" "=== End of Log File ===" | ||
fi | ||
exit $2 | ||
} | ||
|
||
if [ -z "${SCRAM_TEST_PATH}" ]; then | ||
printf "\n%s\n\n" "ERROR -- environment variable SCRAM_TEST_PATH not defined" | ||
exit 1 | ||
fi | ||
|
||
# run test job | ||
exeDir="${SCRAM_TEST_PATH}"/../scripts/utils | ||
|
||
"${exeDir}"/hltMenuContentToCSVs /dev/CMSSW_13_0_0/GRun \ | ||
--meta "${exeDir}"/hltPathOwners.json &> test_hltMenuContentToCSVs_log \ | ||
|| die "Failure running hltMenuContentToCSVs" $? test_hltMenuContentToCSVs_log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
# Pass in name and status | ||
function die { | ||
printf "\n%s: status %s\n" "$1" "$2" | ||
if [ $# -gt 2 ]; then | ||
printf "%s\n" "=== Log File ==========" | ||
cat $3 | ||
printf "%s\n" "=== End of Log File ===" | ||
fi | ||
exit $2 | ||
} | ||
|
||
# run test job | ||
test_hltPrintMenuVersions_1="hltPrintMenuVersions /dev/CMSSW_13_0_0/Fake2" | ||
|
||
${test_hltPrintMenuVersions_1} &> test_hltPrintMenuVersions_log \ | ||
|| die "Failure '${test_hltPrintMenuVersions_1}'" $? test_hltPrintMenuVersions_log | ||
|
||
cat <<@EOF > test_hltPrintMenuVersions_log_expected | ||
HLT Configuration: /dev/CMSSW_13_0_0/Fake2 (database = "run3") | ||
* =/dev/CMSSW_13_0_0/Fake2/V9 (CMSSW_13_0_2)=: !Migration to release template of !CMSSW_13_0_2 | ||
* =/dev/CMSSW_13_0_0/Fake2/V8 (CMSSW_13_0_1)=: !Migration | ||
* =/dev/CMSSW_13_0_0/Fake2/V7 (CMSSW_13_0_0)=: [[https://its.cern.ch/jira/browse/CMSHLT-2651][CMSHLT-2651]]: changed compression settings of all !OutputModules to (algorithm=ZSTD, level=3) | ||
* =/dev/CMSSW_13_0_0/Fake2/V6 (CMSSW_13_0_0)=: !Migration | ||
* =/dev/CMSSW_13_0_0/Fake2/V5 (CMSSW_13_0_0_pre4)=: !Migration | ||
* =/dev/CMSSW_13_0_0/Fake2/V4 (CMSSW_13_0_0_pre3)=: !Migration | ||
* =/dev/CMSSW_13_0_0/Fake2/V3 (CMSSW_13_0_0_pre2)=: !Migration | ||
* =/dev/CMSSW_13_0_0/Fake2/V2 (CMSSW_13_0_0_pre1)=: !Migration | ||
* =/dev/CMSSW_13_0_0/Fake2/V1 (CMSSW_12_6_0_pre5)=: saveAs /dev/CMSSW_12_6_0/Fake2/V6 [7242] | ||
@EOF | ||
|
||
diff test_hltPrintMenuVersions_log test_hltPrintMenuVersions_log_expected \ | ||
|| die "Unexpected differences in outputs of '${test_hltPrintMenuVersions_1}'" $? |