Skip to content

Commit

Permalink
[ANALYSIS] Various fixes/improvements for unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
smuzaffar committed Mar 22, 2023
1 parent 7530dfd commit e6b708a
Show file tree
Hide file tree
Showing 27 changed files with 32 additions and 109 deletions.
5 changes: 1 addition & 4 deletions PhysicsTools/CondLiteIO/test/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
<use name="cppunit"/>
</bin>

<bin file="TestRunnerPhysicsToolsCondLiteIO.cpp">
<flags TEST_RUNNER_ARGS=" /bin/bash PhysicsTools/CondLiteIO/test writeReadTest.sh"/>
<use name="FWCore/Utilities"/>
</bin>
<test name="TestRunnerPhysicsToolsCondLiteIO" command="writeReadTest.sh"/>

</environment>

This file was deleted.

8 changes: 4 additions & 4 deletions PhysicsTools/CondLiteIO/test/writeReadTest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

# Pass in name and status
function die { echo $1: status $2 ; exit $2; }
cmsRun ${LOCAL_TEST_DIR}/write_cfg.py || die 'failed to write conditions' $?
cmsRun ${LOCAL_TEST_DIR}/read_cfg.py || die 'failed to read conditions' $?
cmsRun ${SCRAM_TEST_PATH}/write_cfg.py || die 'failed to write conditions' $?
cmsRun ${SCRAM_TEST_PATH}/read_cfg.py || die 'failed to read conditions' $?

cmsRun ${LOCAL_TEST_DIR}/write2_cfg.py || die 'failed to write conditions by discovering what is in a record' $?
cmsRun ${LOCAL_TEST_DIR}/read_cfg.py || die 'failed to read conditions which used auto discovery' $?
cmsRun ${SCRAM_TEST_PATH}/write2_cfg.py || die 'failed to write conditions by discovering what is in a record' $?
cmsRun ${SCRAM_TEST_PATH}/read_cfg.py || die 'failed to read conditions which used auto discovery' $?

8 changes: 1 addition & 7 deletions PhysicsTools/UtilAlgos/test/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
<environment>
<bin file="runtestUtilAlgos.cpp">
<flags TEST_RUNNER_ARGS=" /bin/bash PhysicsTools/UtilAlgos/test runtests.sh"/>
<use name="FWCore/Utilities"/>
</bin>

</environment>
<test name="runtestUtilAlgos" command="runtests.sh"/>
3 changes: 0 additions & 3 deletions PhysicsTools/UtilAlgos/test/runtestUtilAlgos.cpp

This file was deleted.

8 changes: 4 additions & 4 deletions PhysicsTools/UtilAlgos/test/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

function die { echo $1: status $2 ; exit $2; }

cmsRun ${LOCAL_TEST_DIR}/testPrimaryVertexFilter_cfg.py || die 'Failure using testPrimaryVertexFilter' $?
cmsRun ${SCRAM_TEST_PATH}/testPrimaryVertexFilter_cfg.py || die 'Failure using testPrimaryVertexFilter' $?

cmsRun ${LOCAL_TEST_DIR}/testPrimaryVertexObjectFilter_cfg.py || die 'Failure using testPrimaryVertexObjectFilter' $?
cmsRun ${SCRAM_TEST_PATH}/testPrimaryVertexObjectFilter_cfg.py || die 'Failure using testPrimaryVertexObjectFilter' $?

cmsRun ${LOCAL_TEST_DIR}/cmsswWithPythonConfig_cfg.py || die 'Failure using cmsswWithPythonConfig' $?
cmsRun ${SCRAM_TEST_PATH}/cmsswWithPythonConfig_cfg.py || die 'Failure using cmsswWithPythonConfig' $?

FWLiteWithBasicAnalyzer ${LOCAL_TEST_DIR}/fwliteWithPythonConfig_cfg.py || die 'Failure using fwliteWithPythonConfig' $?
FWLiteWithBasicAnalyzer ${SCRAM_TEST_PATH}/fwliteWithPythonConfig_cfg.py || die 'Failure using fwliteWithPythonConfig' $?

8 changes: 1 addition & 7 deletions TopQuarkAnalysis/TopEventProducers/test/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
<environment>
<bin file="runtestTqafTopEventProducers.cpp">
<flags TEST_RUNNER_ARGS=" /bin/bash TopQuarkAnalysis/TopEventProducers/test runtests.sh"/>
<use name="FWCore/Utilities"/>
</bin>

</environment>
<test name="runtestTqafTopEventProducers" command="runtests.sh"/>

This file was deleted.

14 changes: 7 additions & 7 deletions TopQuarkAnalysis/TopEventProducers/test/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

function die { echo $1: status $2 ; exit $2; }

cmsRun ${LOCAL_TEST_DIR}/tqaf_cfg.py || die 'Failure using tqaf_cfg.py' $?
cmsRun ${SCRAM_TEST_PATH}/tqaf_cfg.py || die 'Failure using tqaf_cfg.py' $?

# FIXME: event content broken in only available data RelVal
# cmsRun ${LOCAL_TEST_DIR}/tqaf_woGeneratorInfo_cfg.py || die 'Failure using tqaf_woGeneratorInfo_cfg.py' $?
# cmsRun ${SCRAM_TEST_PATH}/tqaf_woGeneratorInfo_cfg.py || die 'Failure using tqaf_woGeneratorInfo_cfg.py' $?

cmsRun ${LOCAL_TEST_DIR}/ttDecaySubset_cfg.py || die 'Failure using ttDecaySubset_cfg.py' $?
cmsRun ${SCRAM_TEST_PATH}/ttDecaySubset_cfg.py || die 'Failure using ttDecaySubset_cfg.py' $?

cmsRun ${LOCAL_TEST_DIR}/ttFullHadEvtBuilder_cfg.py || die 'Failure using ttFullHadEvtBuilder_cfg.py' $?
cmsRun ${SCRAM_TEST_PATH}/ttFullHadEvtBuilder_cfg.py || die 'Failure using ttFullHadEvtBuilder_cfg.py' $?

cmsRun ${LOCAL_TEST_DIR}/ttFullLepEvtBuilder_cfg.py || die 'Failure using ttFullLepEvtBuilder_cfg.py' $?
cmsRun ${SCRAM_TEST_PATH}/ttFullLepEvtBuilder_cfg.py || die 'Failure using ttFullLepEvtBuilder_cfg.py' $?

cmsRun ${LOCAL_TEST_DIR}/ttSemiLepEvtBuilder_cfg.py || die 'Failure using ttSemiLepEvtBuilder_cfg.py' $?
cmsRun ${SCRAM_TEST_PATH}/ttSemiLepEvtBuilder_cfg.py || die 'Failure using ttSemiLepEvtBuilder_cfg.py' $?

#cmsRun ${LOCAL_TEST_DIR}/stGenEvent_cfg.py || die 'Failure using stGenEvent_cfg.py' $?
#cmsRun ${SCRAM_TEST_PATH}/stGenEvent_cfg.py || die 'Failure using stGenEvent_cfg.py' $?
8 changes: 1 addition & 7 deletions TopQuarkAnalysis/TopEventSelection/test/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
<environment>
<bin file="runtestTqafTopEventSelection.cpp">
<flags TEST_RUNNER_ARGS=" /bin/bash TopQuarkAnalysis/TopEventSelection/test runtests.sh"/>
<use name="FWCore/Utilities"/>
</bin>

</environment>
<test name="runtestTqafTopEventSelection" command="runtests.sh"/>

This file was deleted.

2 changes: 1 addition & 1 deletion TopQuarkAnalysis/TopEventSelection/test/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

function die { echo $1: status $2 ; exit $2; }

cmsRun ${LOCAL_TEST_DIR}/ttSemiLepSignalSelMVAComputer_cfg.py || die 'Failure using ttSemiLepSignalSelMVAComputer_cfg.py' $?
cmsRun ${SCRAM_TEST_PATH}/ttSemiLepSignalSelMVAComputer_cfg.py || die 'Failure using ttSemiLepSignalSelMVAComputer_cfg.py' $?
8 changes: 1 addition & 7 deletions TopQuarkAnalysis/TopHitFit/test/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
<environment>
<bin file="runtestTqafTopHitFit.cpp">
<flags TEST_RUNNER_ARGS=" /bin/bash TopQuarkAnalysis/TopHitFit/test runtests.sh"/>
<use name="FWCore/Utilities"/>
</bin>

</environment>
<test name="runtestTqafTopHitFit" command="runtests.sh"/>
3 changes: 0 additions & 3 deletions TopQuarkAnalysis/TopHitFit/test/runtestTqafTopHitFit.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion TopQuarkAnalysis/TopHitFit/test/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

function die { echo $1: status $2 ; exit $2; }

cmsRun ${LOCAL_TEST_DIR}/ttSemiLepHitFitProducer_cfg.py || die 'Failure using ttSemiLepHitFitProducer_cfg.py' $?
cmsRun ${SCRAM_TEST_PATH}/ttSemiLepHitFitProducer_cfg.py || die 'Failure using ttSemiLepHitFitProducer_cfg.py' $?
8 changes: 1 addition & 7 deletions TopQuarkAnalysis/TopJetCombination/test/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
<environment>
<bin file="runtestTqafTopJetCombination.cpp">
<flags TEST_RUNNER_ARGS=" /bin/bash TopQuarkAnalysis/TopJetCombination/test runtests.sh"/>
<use name="FWCore/Utilities"/>
</bin>

</environment>
<test name="runtestTqafTopJetCombination" command="runtests.sh"/>

This file was deleted.

2 changes: 1 addition & 1 deletion TopQuarkAnalysis/TopJetCombination/test/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

function die { echo $1: status $2 ; exit $2; }

cmsRun ${LOCAL_TEST_DIR}/ttSemiLepJetCombMVAComputer_cfg.py || die 'Failure using ttSemiLepJetCombMVAComputer_cfg.py' $?
cmsRun ${SCRAM_TEST_PATH}/ttSemiLepJetCombMVAComputer_cfg.py || die 'Failure using ttSemiLepJetCombMVAComputer_cfg.py' $?
8 changes: 1 addition & 7 deletions TopQuarkAnalysis/TopKinFitter/test/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
<environment>
<bin file="runtestTqafTopKinFitter.cpp">
<flags TEST_RUNNER_ARGS=" /bin/bash TopQuarkAnalysis/TopKinFitter/test runtests.sh"/>
<use name="FWCore/Utilities"/>
</bin>

</environment>
<test name="runtestTqafTopKinFitter" command="runtests.sh"/>

This file was deleted.

6 changes: 3 additions & 3 deletions TopQuarkAnalysis/TopKinFitter/test/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

function die { echo $1: status $2 ; exit $2; }

cmsRun ${LOCAL_TEST_DIR}/ttFullLepKinSolutionProducer_cfg.py || die 'Failure using ttFullLepKinSolutionProducer_cfg.py' $?
cmsRun ${SCRAM_TEST_PATH}/ttFullLepKinSolutionProducer_cfg.py || die 'Failure using ttFullLepKinSolutionProducer_cfg.py' $?

cmsRun ${LOCAL_TEST_DIR}/ttFullHadKinFitProducer_cfg.py || die 'Failure using ttFullHadKinFitProducer_cfg.py' $?
cmsRun ${SCRAM_TEST_PATH}/ttFullHadKinFitProducer_cfg.py || die 'Failure using ttFullHadKinFitProducer_cfg.py' $?

cmsRun ${LOCAL_TEST_DIR}/ttSemiLepKinFitProducer_cfg.py || die 'Failure using ttSemiLepKinFitProducer_cfg.py' $?
cmsRun ${SCRAM_TEST_PATH}/ttSemiLepKinFitProducer_cfg.py || die 'Failure using ttSemiLepKinFitProducer_cfg.py' $?
8 changes: 1 addition & 7 deletions TopQuarkAnalysis/TopSkimming/test/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
<environment>
<bin file="runtestTqafTopSkimming.cpp">
<flags TEST_RUNNER_ARGS=" /bin/bash TopQuarkAnalysis/TopSkimming/test runtests.sh"/>
<use name="FWCore/Utilities"/>
</bin>

</environment>
<test name="runtestTqafTopSkimming" command="runtests.sh"/>
3 changes: 0 additions & 3 deletions TopQuarkAnalysis/TopSkimming/test/runtestTqafTopSkimming.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion TopQuarkAnalysis/TopSkimming/test/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

function die { echo $1: status $2 ; exit $2; }

cmsRun ${LOCAL_TEST_DIR}/ttDecayChannelFilters_cfg.py || die 'Failure using ttDecayChannelFilters_cfg.py' $?
cmsRun ${SCRAM_TEST_PATH}/ttDecayChannelFilters_cfg.py || die 'Failure using ttDecayChannelFilters_cfg.py' $?
7 changes: 1 addition & 6 deletions TopQuarkAnalysis/TopTools/test/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<environment>
<bin file="runtestTqafTopTools.cpp">
<flags TEST_RUNNER_ARGS=" /bin/bash TopQuarkAnalysis/TopTools/test runtests.sh"/>
<use name="FWCore/Utilities"/>
</bin>
<test name="runtestTqafTopTools" command="runtests.sh"/>

</environment>
<library file="TestGenTtbarCategories.cc">
<flags EDM_PLUGIN="1"/>
<use name="FWCore/Framework"/>
Expand Down
3 changes: 0 additions & 3 deletions TopQuarkAnalysis/TopTools/test/runtestTqafTopTools.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion TopQuarkAnalysis/TopTools/test/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

function die { echo $1: status $2 ; exit $2; }

cmsRun ${LOCAL_TEST_DIR}/ttJetPartonMatch_cfg.py || die 'Failure using ttJetPartonMatch_cfg.py' $?
cmsRun ${SCRAM_TEST_PATH}/ttJetPartonMatch_cfg.py || die 'Failure using ttJetPartonMatch_cfg.py' $?

0 comments on commit e6b708a

Please sign in to comment.