From 6fa8be980c97777db967c73ed28a6ad9f6fe840c Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Wed, 22 Mar 2023 18:11:38 +0100 Subject: [PATCH] [CORE] Various fixes/improvements for unit test --- DataFormats/FWLite/test/BuildFile.xml | 15 ++----- DataFormats/FWLite/test/MergeTest.sh | 8 ++-- DataFormats/FWLite/test/RefTest.sh | 10 ++--- DataFormats/FWLite/test/RefTest_a.sh | 8 ++-- .../test/TestRunnerDataFormatsFWLite.cpp | 3 -- DataFormats/FWLite/test/VIPTest.sh | 4 +- DataFormats/FWLite/test/run_all_t.sh | 44 +++++++++---------- FWCore/FWLite/test/BuildFile.xml | 9 +--- FWCore/FWLite/test/RefTest.sh | 10 ++--- FWCore/FWLite/test/TestRunnerFWCoreFWLite.cpp | 3 -- FWCore/FWLite/test/run_all_t.sh | 6 +-- FWCore/Modules/test/BuildFile.xml | 20 ++++----- FWCore/Modules/test/FWCoreModulesTest.sh | 16 +++---- FWCore/Modules/test/TestIntegration.cpp | 3 -- FWCore/ParameterSet/test/BuildFile.xml | 5 +-- .../test/TestFWCoreParameterSetDriver.cpp | 3 -- FWCore/PythonFramework/test/BuildFile.xml | 5 +-- .../test/TestFWCorePythonFrameworkDriver.cpp | 3 -- FWCore/PythonFramework/test/runPythonTests.sh | 2 +- FWCore/Utilities/test/BuildFile.xml | 4 +- FWCore/Utilities/test/TestHelper_t.cpp | 2 - FWCore/Utilities/test/testAdler32.sh | 2 +- IOMC/RandomEngine/test/BuildFile.xml | 4 +- .../test/TestIOMCRandomEngineService.cpp | 3 -- IOMC/RandomEngine/test/testRandomService.sh | 39 +++++++--------- 25 files changed, 87 insertions(+), 144 deletions(-) delete mode 100644 DataFormats/FWLite/test/TestRunnerDataFormatsFWLite.cpp delete mode 100644 FWCore/FWLite/test/TestRunnerFWCoreFWLite.cpp delete mode 100644 FWCore/Modules/test/TestIntegration.cpp delete mode 100644 FWCore/ParameterSet/test/TestFWCoreParameterSetDriver.cpp delete mode 100644 FWCore/PythonFramework/test/TestFWCorePythonFrameworkDriver.cpp delete mode 100644 FWCore/Utilities/test/TestHelper_t.cpp delete mode 100644 IOMC/RandomEngine/test/TestIOMCRandomEngineService.cpp diff --git a/DataFormats/FWLite/test/BuildFile.xml b/DataFormats/FWLite/test/BuildFile.xml index b1c0a7386a6bc..bf4aab00c5a65 100644 --- a/DataFormats/FWLite/test/BuildFile.xml +++ b/DataFormats/FWLite/test/BuildFile.xml @@ -1,10 +1,5 @@ - - - - - - - + + @@ -13,8 +8,6 @@ - + - - - + diff --git a/DataFormats/FWLite/test/MergeTest.sh b/DataFormats/FWLite/test/MergeTest.sh index ea03f9f0ade34..9a52f8074156b 100755 --- a/DataFormats/FWLite/test/MergeTest.sh +++ b/DataFormats/FWLite/test/MergeTest.sh @@ -1,6 +1,6 @@ #!/bin/sh -rm -f ${LOCAL_TEST_DIR}/prod1.root ${LOCAL_TEST_DIR}/prod2.root ${LOCAL_TEST_DIR}/prodmerge.root +rm -f ${SCRAM_TEST_PATH}/prod1.root ${SCRAM_TEST_PATH}/prod2.root ${SCRAM_TEST_PATH}/prodmerge.root rm -f prod1.root prod2.root prodmerge.root -cmsRun ${LOCAL_TEST_DIR}/ProdTest1_cfg.py -cmsRun ${LOCAL_TEST_DIR}/ProdTest2_cfg.py -cmsRun ${LOCAL_TEST_DIR}/ProdTestMerge_cfg.py +cmsRun ${SCRAM_TEST_PATH}/ProdTest1_cfg.py +cmsRun ${SCRAM_TEST_PATH}/ProdTest2_cfg.py +cmsRun ${SCRAM_TEST_PATH}/ProdTestMerge_cfg.py diff --git a/DataFormats/FWLite/test/RefTest.sh b/DataFormats/FWLite/test/RefTest.sh index 4cca5de370e0b..1479bc341f646 100755 --- a/DataFormats/FWLite/test/RefTest.sh +++ b/DataFormats/FWLite/test/RefTest.sh @@ -9,14 +9,14 @@ rm -f other_onlyDataFormatsFWLite.root good_delta5DataFormatsFWLite.root rm -f partialEventDataFormatsFWLite.root refTestCopyDropDataFormatsFWLite.root echo RefTest_cfg.py -cmsRun ${LOCAL_TEST_DIR}/RefTest_cfg.py || die "cmsRun RefTest_cfg.py" $? +cmsRun ${SCRAM_TEST_PATH}/RefTest_cfg.py || die "cmsRun RefTest_cfg.py" $? echo RefTest2_cfg.py -cmsRun ${LOCAL_TEST_DIR}/RefTest2_cfg.py || die "cmsRun RefTest2_cfg.py" $? +cmsRun ${SCRAM_TEST_PATH}/RefTest2_cfg.py || die "cmsRun RefTest2_cfg.py" $? echo EmptyFile_cfg.py -cmsRun ${LOCAL_TEST_DIR}/EmptyFile_cfg.py || die "cmsRun EmptyFile_cfg.py" $? +cmsRun ${SCRAM_TEST_PATH}/EmptyFile_cfg.py || die "cmsRun EmptyFile_cfg.py" $? echo PartialEventTest_cfg.py -cmsRun ${LOCAL_TEST_DIR}/PartialEventTest_cfg.py || die "cmsRun PartialEventTest_cfg.py" $? +cmsRun ${SCRAM_TEST_PATH}/PartialEventTest_cfg.py || die "cmsRun PartialEventTest_cfg.py" $? echo RefTestCopyDrop_cfg.py -cmsRun ${LOCAL_TEST_DIR}/RefTestCopyDrop_cfg.py || die "cmsRun RefTestCopyDrop_cfg.py" $? +cmsRun ${SCRAM_TEST_PATH}/RefTestCopyDrop_cfg.py || die "cmsRun RefTestCopyDrop_cfg.py" $? exit 0 diff --git a/DataFormats/FWLite/test/RefTest_a.sh b/DataFormats/FWLite/test/RefTest_a.sh index 06f4e7b7b6a8b..2749e9b8f645b 100755 --- a/DataFormats/FWLite/test/RefTest_a.sh +++ b/DataFormats/FWLite/test/RefTest_a.sh @@ -1,6 +1,6 @@ #!/bin/sh -rm -f ${LOCAL_TEST_DIR}/good_a.root ${LOCAL_TEST_DIR}/good_b.root ${LOCAL_TEST_DIR}/empty_a.root +rm -f ${SCRAM_TEST_PATH}/good_a.root ${SCRAM_TEST_PATH}/good_b.root ${SCRAM_TEST_PATH}/empty_a.root rm -f good_a.root good_b.root empty_a.root -cmsRun ${LOCAL_TEST_DIR}/RefTest_a_cfg.py -cmsRun ${LOCAL_TEST_DIR}/RefTest_b_cfg.py -cmsRun ${LOCAL_TEST_DIR}/EmptyFile_a_cfg.py +cmsRun ${SCRAM_TEST_PATH}/RefTest_a_cfg.py +cmsRun ${SCRAM_TEST_PATH}/RefTest_b_cfg.py +cmsRun ${SCRAM_TEST_PATH}/EmptyFile_a_cfg.py diff --git a/DataFormats/FWLite/test/TestRunnerDataFormatsFWLite.cpp b/DataFormats/FWLite/test/TestRunnerDataFormatsFWLite.cpp deleted file mode 100644 index b2991bd18ae57..0000000000000 --- a/DataFormats/FWLite/test/TestRunnerDataFormatsFWLite.cpp +++ /dev/null @@ -1,3 +0,0 @@ -#include "FWCore/Utilities/interface/TestHelper.h" - -RUNTEST() diff --git a/DataFormats/FWLite/test/VIPTest.sh b/DataFormats/FWLite/test/VIPTest.sh index 1e1cc1e6d6826..9fa31fb598798 100755 --- a/DataFormats/FWLite/test/VIPTest.sh +++ b/DataFormats/FWLite/test/VIPTest.sh @@ -1,4 +1,4 @@ #!/bin/sh -rm -f ${LOCAL_TEST_DIR}/vectorinttest.root +rm -f ${SCRAM_TEST_PATH}/vectorinttest.root rm -f vectorinttest.root -cmsRun ${LOCAL_TEST_DIR}/vip_cfg.py +cmsRun ${SCRAM_TEST_PATH}/vip_cfg.py diff --git a/DataFormats/FWLite/test/run_all_t.sh b/DataFormats/FWLite/test/run_all_t.sh index 334cb37510b75..8bb08ff8c91c6 100755 --- a/DataFormats/FWLite/test/run_all_t.sh +++ b/DataFormats/FWLite/test/run_all_t.sh @@ -4,32 +4,32 @@ # Pass in name and status function die { echo $1: status $2 ; exit $2; } -${LOCAL_TEST_DIR}/RefTest_a.sh || die 'Failed to create file' $? -root -b -n -q ${LOCAL_TEST_DIR}/event_looping_cint.C || die 'Failed in event_looping_cint.C' $? -root -b -n -q ${LOCAL_TEST_DIR}/event_looping_consumes_cint.C || die 'Failed in event_looping_cint.C' $? -root -b -n -q ${LOCAL_TEST_DIR}/chainevent_looping_cint.C || die 'Failed in chainevent_looping_cint.C' $? -python3 ${LOCAL_TEST_DIR}/chainEvent_python.py || die 'Failed in chainEvent_python.py' $? -#root -b -n -q ${LOCAL_TEST_DIR}/autoload_with_std.C || die 'Failed in autoload_with_std.C' $? -#root -b -n -q ${LOCAL_TEST_DIR}/autoload_with_missing_std.C || die 'Failed in autoload_with_missing_std.C' $? +${SCRAM_TEST_PATH}/RefTest_a.sh || die 'Failed to create file' $? +root -b -n -q ${SCRAM_TEST_PATH}/event_looping_cint.C || die 'Failed in event_looping_cint.C' $? +root -b -n -q ${SCRAM_TEST_PATH}/event_looping_consumes_cint.C || die 'Failed in event_looping_cint.C' $? +root -b -n -q ${SCRAM_TEST_PATH}/chainevent_looping_cint.C || die 'Failed in chainevent_looping_cint.C' $? +python3 ${SCRAM_TEST_PATH}/chainEvent_python.py || die 'Failed in chainEvent_python.py' $? +#root -b -n -q ${SCRAM_TEST_PATH}/autoload_with_std.C || die 'Failed in autoload_with_std.C' $? +#root -b -n -q ${SCRAM_TEST_PATH}/autoload_with_missing_std.C || die 'Failed in autoload_with_missing_std.C' $? -${LOCAL_TEST_DIR}/MergeTest.sh || die 'Failed to create file' $? -root -b -n -q ${LOCAL_TEST_DIR}/runlumi_looping_cint.C || die 'Failed in runlumi_looping_cint.C' $? -root -b -n -q ${LOCAL_TEST_DIR}/productid_cint.C || die 'Failed in productid_cint.C' $? -root -b -n -q ${LOCAL_TEST_DIR}/triggernames_cint.C || die 'Failed in triggernames_cint.C' $? -root -b -n -q ${LOCAL_TEST_DIR}/triggernames_multi_cint.C || die 'Failed in triggernames_multi_cint.C' $? -root -b -n -q ${LOCAL_TEST_DIR}/triggerResultsByName_cint.C || die 'Failed in triggerResultsByName_cint.C' $? -root -b -n -q ${LOCAL_TEST_DIR}/triggerResultsByName_multi_cint.C || die 'Failed in triggerResultsByName_multi_cint.C' $? +${SCRAM_TEST_PATH}/MergeTest.sh || die 'Failed to create file' $? +root -b -n -q ${SCRAM_TEST_PATH}/runlumi_looping_cint.C || die 'Failed in runlumi_looping_cint.C' $? +root -b -n -q ${SCRAM_TEST_PATH}/productid_cint.C || die 'Failed in productid_cint.C' $? +root -b -n -q ${SCRAM_TEST_PATH}/triggernames_cint.C || die 'Failed in triggernames_cint.C' $? +root -b -n -q ${SCRAM_TEST_PATH}/triggernames_multi_cint.C || die 'Failed in triggernames_multi_cint.C' $? +root -b -n -q ${SCRAM_TEST_PATH}/triggerResultsByName_cint.C || die 'Failed in triggerResultsByName_cint.C' $? +root -b -n -q ${SCRAM_TEST_PATH}/triggerResultsByName_multi_cint.C || die 'Failed in triggerResultsByName_multi_cint.C' $? -${LOCAL_TEST_DIR}/VIPTest.sh || die 'Failed to create file' $? -root -b -n -q ${LOCAL_TEST_DIR}/vector_int_cint.C || die 'Failed in vector_int_cint.C' $? +${SCRAM_TEST_PATH}/VIPTest.sh || die 'Failed to create file' $? +root -b -n -q ${SCRAM_TEST_PATH}/vector_int_cint.C || die 'Failed in vector_int_cint.C' $? -python3 ${LOCAL_TEST_DIR}/pyroot_handle_reuse.py || die 'Failed in pyroot_handle_reuse.py' $? -python3 ${LOCAL_TEST_DIR}/pyroot_multichain.py inputFiles=file:prodmerge.root secondaryInputFiles=file:prod1.root,file:prod2.root || die 'Failed in pyroot_multichain.py (non-empty files)' $? -python3 ${LOCAL_TEST_DIR}/pyroot_multichain.py inputFiles=file:empty_a.root secondaryInputFiles=file:good_a.root || die 'Failed in pyroot_multichain.py (empty file)' $? +python3 ${SCRAM_TEST_PATH}/pyroot_handle_reuse.py || die 'Failed in pyroot_handle_reuse.py' $? +python3 ${SCRAM_TEST_PATH}/pyroot_multichain.py inputFiles=file:prodmerge.root secondaryInputFiles=file:prod1.root,file:prod2.root || die 'Failed in pyroot_multichain.py (non-empty files)' $? +python3 ${SCRAM_TEST_PATH}/pyroot_multichain.py inputFiles=file:empty_a.root secondaryInputFiles=file:good_a.root || die 'Failed in pyroot_multichain.py (empty file)' $? #NOTE: ROOT has a bug which keeps the AssociationVector from running its ioread rule and therefore it never clears its cache #test AssociationVector reading -#rm -f ${LOCAL_TEST_DIR}/avtester.root +#rm -f ${SCRAM_TEST_PATH}/avtester.root #rm -f avtester.root -#cmsRun ${LOCAL_TEST_DIR}/make_associationvector_file_cfg.py || die "cmsRun make_associationvector_file_cfg.py " $? -#python ${LOCAL_TEST_DIR}/pyroot_read_associationvector.py || die 'Failed in pyroot_read_associationvector.py' +#cmsRun ${SCRAM_TEST_PATH}/make_associationvector_file_cfg.py || die "cmsRun make_associationvector_file_cfg.py " $? +#python ${SCRAM_TEST_PATH}/pyroot_read_associationvector.py || die 'Failed in pyroot_read_associationvector.py' diff --git a/FWCore/FWLite/test/BuildFile.xml b/FWCore/FWLite/test/BuildFile.xml index 88c080a955dc0..d9b36bfa5240b 100644 --- a/FWCore/FWLite/test/BuildFile.xml +++ b/FWCore/FWLite/test/BuildFile.xml @@ -1,12 +1,7 @@ - - - + - - - - + diff --git a/FWCore/FWLite/test/RefTest.sh b/FWCore/FWLite/test/RefTest.sh index bdbc05878d936..23bd3899ff6ac 100755 --- a/FWCore/FWLite/test/RefTest.sh +++ b/FWCore/FWLite/test/RefTest.sh @@ -2,13 +2,13 @@ function die { echo Failure $1: status $2 ; exit $2 ; } -rm -f ${LOCAL_TEST_DIR}/good.root -rm -f ${LOCAL_TEST_DIR}/good2.root -rm -f ${LOCAL_TEST_DIR}/good_delta5.root +rm -f ${SCRAM_TEST_PATH}/good.root +rm -f ${SCRAM_TEST_PATH}/good2.root +rm -f ${SCRAM_TEST_PATH}/good_delta5.root rm -f good.root rm -f good2.root rm -f good_delta5.root -cmsRun ${LOCAL_TEST_DIR}/RefTest_cfg.py || die "cmsRun RefTest_cfg.py" $? +cmsRun ${SCRAM_TEST_PATH}/RefTest_cfg.py || die "cmsRun RefTest_cfg.py" $? -cmsRun ${LOCAL_TEST_DIR}/RefTest2_cfg.py || die "cmsRun RefTest2_cfg.py" $? +cmsRun ${SCRAM_TEST_PATH}/RefTest2_cfg.py || die "cmsRun RefTest2_cfg.py" $? diff --git a/FWCore/FWLite/test/TestRunnerFWCoreFWLite.cpp b/FWCore/FWLite/test/TestRunnerFWCoreFWLite.cpp deleted file mode 100644 index b2991bd18ae57..0000000000000 --- a/FWCore/FWLite/test/TestRunnerFWCoreFWLite.cpp +++ /dev/null @@ -1,3 +0,0 @@ -#include "FWCore/Utilities/interface/TestHelper.h" - -RUNTEST() diff --git a/FWCore/FWLite/test/run_all_t.sh b/FWCore/FWLite/test/run_all_t.sh index 53152a2c64f56..aba409156baae 100755 --- a/FWCore/FWLite/test/run_all_t.sh +++ b/FWCore/FWLite/test/run_all_t.sh @@ -4,8 +4,8 @@ # Pass in name and status function die { echo $1: status $2 ; exit $2; } -root -b -n -q ${LOCAL_TEST_DIR}/autoload_with_namespace.C || die 'Failed in autoload_with_namespace.C' $? -root -b -n -q ${LOCAL_TEST_DIR}/autoload_with_std.C || die 'Failed in autoload_with_std.C' $? -root -b -n -q ${LOCAL_TEST_DIR}/autoload_with_missing_std.C || die 'Failed in autoload_with_missing_std.C' $? +root -b -n -q ${SCRAM_TEST_PATH}/autoload_with_namespace.C || die 'Failed in autoload_with_namespace.C' $? +root -b -n -q ${SCRAM_TEST_PATH}/autoload_with_std.C || die 'Failed in autoload_with_std.C' $? +root -b -n -q ${SCRAM_TEST_PATH}/autoload_with_missing_std.C || die 'Failed in autoload_with_missing_std.C' $? diff --git a/FWCore/Modules/test/BuildFile.xml b/FWCore/Modules/test/BuildFile.xml index baa5e186db189..e18f700307177 100644 --- a/FWCore/Modules/test/BuildFile.xml +++ b/FWCore/Modules/test/BuildFile.xml @@ -1,14 +1,10 @@ - - - - - + - - - - - - + - + + + + + + diff --git a/FWCore/Modules/test/FWCoreModulesTest.sh b/FWCore/Modules/test/FWCoreModulesTest.sh index 606e4a4fa1106..6f211b1e0997e 100755 --- a/FWCore/Modules/test/FWCoreModulesTest.sh +++ b/FWCore/Modules/test/FWCoreModulesTest.sh @@ -2,19 +2,15 @@ function die { echo $1: status $2; exit $2; } -pushd ${LOCAL_TMP_DIR} - echo ContentTest -cmsRun ${LOCAL_TEST_DIR}/ContentTest_cfg.py || die 'failed running cmsRun ContentTest_cfg.py' $? +cmsRun ${SCRAM_TEST_PATH}/ContentTest_cfg.py || die 'failed running cmsRun ContentTest_cfg.py' $? echo printeventsetupcontent -cmsRun ${LOCAL_TEST_DIR}/printeventsetupcontent_cfg.py || die 'failed running cmsRun printeventsetupcontent_cfg.py' $? +cmsRun ${SCRAM_TEST_PATH}/printeventsetupcontent_cfg.py || die 'failed running cmsRun printeventsetupcontent_cfg.py' $? echo geteventsetupcontent -cmsRun ${LOCAL_TEST_DIR}/geteventsetupcontent_cfg.py || die 'failed running cmsRun geteventsetupcontent_cfg.py' $? +cmsRun ${SCRAM_TEST_PATH}/geteventsetupcontent_cfg.py || die 'failed running cmsRun geteventsetupcontent_cfg.py' $? echo checkcacheidentifier -cmsRun ${LOCAL_TEST_DIR}/checkcacheidentifier_cfg.py || die 'failed running cmsRun checkcacheidentifier_cfg.py' $? +cmsRun ${SCRAM_TEST_PATH}/checkcacheidentifier_cfg.py || die 'failed running cmsRun checkcacheidentifier_cfg.py' $? echo testPathStatusFilter -cmsRun ${LOCAL_TEST_DIR}/testPathStatusFilter_cfg.py || die 'failed running cmsRun testPathStatusFilter_cfg.py' $? +cmsRun ${SCRAM_TEST_PATH}/testPathStatusFilter_cfg.py || die 'failed running cmsRun testPathStatusFilter_cfg.py' $? echo sleepingModules -cmsRun ${LOCAL_TEST_DIR}/sleepingModules_cfg.py || die 'failed running cmsRun sleepingModules_cfg.py' $? - -popd +cmsRun ${SCRAM_TEST_PATH}/sleepingModules_cfg.py || die 'failed running cmsRun sleepingModules_cfg.py' $? diff --git a/FWCore/Modules/test/TestIntegration.cpp b/FWCore/Modules/test/TestIntegration.cpp deleted file mode 100644 index b2991bd18ae57..0000000000000 --- a/FWCore/Modules/test/TestIntegration.cpp +++ /dev/null @@ -1,3 +0,0 @@ -#include "FWCore/Utilities/interface/TestHelper.h" - -RUNTEST() diff --git a/FWCore/ParameterSet/test/BuildFile.xml b/FWCore/ParameterSet/test/BuildFile.xml index b57f2be9ae082..7d0a66d540aa7 100644 --- a/FWCore/ParameterSet/test/BuildFile.xml +++ b/FWCore/ParameterSet/test/BuildFile.xml @@ -11,10 +11,7 @@ - - - - + diff --git a/FWCore/ParameterSet/test/TestFWCoreParameterSetDriver.cpp b/FWCore/ParameterSet/test/TestFWCoreParameterSetDriver.cpp deleted file mode 100644 index b2991bd18ae57..0000000000000 --- a/FWCore/ParameterSet/test/TestFWCoreParameterSetDriver.cpp +++ /dev/null @@ -1,3 +0,0 @@ -#include "FWCore/Utilities/interface/TestHelper.h" - -RUNTEST() diff --git a/FWCore/PythonFramework/test/BuildFile.xml b/FWCore/PythonFramework/test/BuildFile.xml index 7630445ab8594..e2fe88a729d9f 100644 --- a/FWCore/PythonFramework/test/BuildFile.xml +++ b/FWCore/PythonFramework/test/BuildFile.xml @@ -1,7 +1,4 @@ - - - - + diff --git a/FWCore/PythonFramework/test/TestFWCorePythonFrameworkDriver.cpp b/FWCore/PythonFramework/test/TestFWCorePythonFrameworkDriver.cpp deleted file mode 100644 index b2991bd18ae57..0000000000000 --- a/FWCore/PythonFramework/test/TestFWCorePythonFrameworkDriver.cpp +++ /dev/null @@ -1,3 +0,0 @@ -#include "FWCore/Utilities/interface/TestHelper.h" - -RUNTEST() diff --git a/FWCore/PythonFramework/test/runPythonTests.sh b/FWCore/PythonFramework/test/runPythonTests.sh index 21e17a0d38b6e..96165342aa2ad 100755 --- a/FWCore/PythonFramework/test/runPythonTests.sh +++ b/FWCore/PythonFramework/test/runPythonTests.sh @@ -14,4 +14,4 @@ do done echo "running test_producer.py" -${python_cmd} ${LOCAL_TEST_DIR}/test_producer.py || die "test_producer.py failed" $? +${python_cmd} ${SCRAM_TEST_PATH}/test_producer.py || die "test_producer.py failed" $? diff --git a/FWCore/Utilities/test/BuildFile.xml b/FWCore/Utilities/test/BuildFile.xml index bb169d5c4036d..1f5404ed2472d 100644 --- a/FWCore/Utilities/test/BuildFile.xml +++ b/FWCore/Utilities/test/BuildFile.xml @@ -1,9 +1,7 @@ - - - + diff --git a/FWCore/Utilities/test/TestHelper_t.cpp b/FWCore/Utilities/test/TestHelper_t.cpp deleted file mode 100644 index 2f0e0c40064da..0000000000000 --- a/FWCore/Utilities/test/TestHelper_t.cpp +++ /dev/null @@ -1,2 +0,0 @@ -#include "FWCore/Utilities/interface/TestHelper.h" -RUNTEST() diff --git a/FWCore/Utilities/test/testAdler32.sh b/FWCore/Utilities/test/testAdler32.sh index 43bec8cc59a4c..4aac0abdcdcd8 100755 --- a/FWCore/Utilities/test/testAdler32.sh +++ b/FWCore/Utilities/test/testAdler32.sh @@ -2,7 +2,7 @@ echo "===== Running test of cms_adler32 ======" expect="fd466a74" -results=`cms_adler32 $LOCAL_TEST_DIR/doNotModify.txt | awk '{print $1}'` +results=`cms_adler32 ${SCRAM_TEST_PATH}/doNotModify.txt | awk '{print $1}'` if [ "$results" != "$expect" ]; then echo "result: " $results diff --git a/IOMC/RandomEngine/test/BuildFile.xml b/IOMC/RandomEngine/test/BuildFile.xml index a1fa2d3f03171..3ad47ec455b55 100644 --- a/IOMC/RandomEngine/test/BuildFile.xml +++ b/IOMC/RandomEngine/test/BuildFile.xml @@ -8,6 +8,4 @@ - - - + diff --git a/IOMC/RandomEngine/test/TestIOMCRandomEngineService.cpp b/IOMC/RandomEngine/test/TestIOMCRandomEngineService.cpp deleted file mode 100644 index b2991bd18ae57..0000000000000 --- a/IOMC/RandomEngine/test/TestIOMCRandomEngineService.cpp +++ /dev/null @@ -1,3 +0,0 @@ -#include "FWCore/Utilities/interface/TestHelper.h" - -RUNTEST() diff --git a/IOMC/RandomEngine/test/testRandomService.sh b/IOMC/RandomEngine/test/testRandomService.sh index b65d4c2969d1f..65c5b0b6f2fb6 100755 --- a/IOMC/RandomEngine/test/testRandomService.sh +++ b/IOMC/RandomEngine/test/testRandomService.sh @@ -4,50 +4,47 @@ function die { echo Failure $1: status $2 ; exit $2 ; } test=testRandomService -pushd ${LOCAL_TMP_DIR} - - echo " " echo "RandomNumberGeneratorService 1" echo "==============================================" - cmsRun ${LOCAL_TEST_DIR}/${test}1_cfg.py > testRandomService1Dump.txt || die "cmsRun ${LOCAL_TEST_DIR}/${test}1_cfg.py" $? - diff ${LOCAL_TEST_DIR}/unit_test_outputs/testRandomService1Dump.txt testRandomService1Dump.txt || die "comparing testRandomService1Dump.txt" $? + cmsRun ${SCRAM_TEST_PATH}/${test}1_cfg.py > testRandomService1Dump.txt || die "cmsRun ${SCRAM_TEST_PATH}/${test}1_cfg.py" $? + diff ${SCRAM_TEST_PATH}/unit_test_outputs/testRandomService1Dump.txt testRandomService1Dump.txt || die "comparing testRandomService1Dump.txt" $? mv testRandomService_0_t1.txt testRandomService1_0_t1.txt mv testRandomService_0_t2.txt testRandomService1_0_t2.txt mv testRandomService_0_t3.txt testRandomService1_0_t3.txt mv testRandomService_0_t4.txt testRandomService1_0_t4.txt mv testRandomService_0_t6.txt testRandomService1_0_t6.txt - diff ${LOCAL_TEST_DIR}/unit_test_outputs/testRandomService1_0_t1.txt testRandomService1_0_t1.txt || die "comparing testRandomService1_0_t1.txt" $? - diff ${LOCAL_TEST_DIR}/unit_test_outputs/testRandomService1_0_t2.txt testRandomService1_0_t2.txt || die "comparing testRandomService1_0_t2.txt" $? - diff ${LOCAL_TEST_DIR}/unit_test_outputs/testRandomService1_0_t3.txt testRandomService1_0_t3.txt || die "comparing testRandomService1_0_t3.txt" $? - diff ${LOCAL_TEST_DIR}/unit_test_outputs/testRandomService1_0_t4.txt testRandomService1_0_t4.txt || die "comparing testRandomService1_0_t4.txt" $? - diff ${LOCAL_TEST_DIR}/unit_test_outputs/testRandomService1_0_t6.txt testRandomService1_0_t6.txt || die "comparing testRandomService1_0_t6.txt" $? + diff ${SCRAM_TEST_PATH}/unit_test_outputs/testRandomService1_0_t1.txt testRandomService1_0_t1.txt || die "comparing testRandomService1_0_t1.txt" $? + diff ${SCRAM_TEST_PATH}/unit_test_outputs/testRandomService1_0_t2.txt testRandomService1_0_t2.txt || die "comparing testRandomService1_0_t2.txt" $? + diff ${SCRAM_TEST_PATH}/unit_test_outputs/testRandomService1_0_t3.txt testRandomService1_0_t3.txt || die "comparing testRandomService1_0_t3.txt" $? + diff ${SCRAM_TEST_PATH}/unit_test_outputs/testRandomService1_0_t4.txt testRandomService1_0_t4.txt || die "comparing testRandomService1_0_t4.txt" $? + diff ${SCRAM_TEST_PATH}/unit_test_outputs/testRandomService1_0_t6.txt testRandomService1_0_t6.txt || die "comparing testRandomService1_0_t6.txt" $? echo " " echo "RandomNumberGeneratorService 2" echo "==============================================" - cmsRun ${LOCAL_TEST_DIR}/${test}2_cfg.py || die "cmsRun ${LOCAL_TEST_DIR}/${test}2_cfg.py" $? + cmsRun ${SCRAM_TEST_PATH}/${test}2_cfg.py || die "cmsRun ${SCRAM_TEST_PATH}/${test}2_cfg.py" $? echo " " echo "RandomNumberGeneratorService 3" echo "==============================================" - cmsRun ${LOCAL_TEST_DIR}/${test}3_cfg.py || die "cmsRun ${LOCAL_TEST_DIR}/${test}3_cfg.py" $? + cmsRun ${SCRAM_TEST_PATH}/${test}3_cfg.py || die "cmsRun ${SCRAM_TEST_PATH}/${test}3_cfg.py" $? echo " " echo "RandomNumberGeneratorService merge" echo "==============================================" - cmsRun ${LOCAL_TEST_DIR}/${test}Merge1_cfg.py || die "cmsRun ${LOCAL_TEST_DIR}/${test}Merge1_cfg.py" $? + cmsRun ${SCRAM_TEST_PATH}/${test}Merge1_cfg.py || die "cmsRun ${SCRAM_TEST_PATH}/${test}Merge1_cfg.py" $? echo " " echo "RandomNumberGeneratorService test 1, replay from event" echo "==============================================" - cmsRun ${LOCAL_TEST_DIR}/${test}Test1_cfg.py || die "cmsRun ${LOCAL_TEST_DIR}/${test}Test1_cfg.py" $? + cmsRun ${SCRAM_TEST_PATH}/${test}Test1_cfg.py || die "cmsRun ${SCRAM_TEST_PATH}/${test}Test1_cfg.py" $? echo " " echo "RandomNumberGeneratorService test 2, replay from text file" echo "==============================================" - cmsRun ${LOCAL_TEST_DIR}/${test}Test2_cfg.py || die "cmsRun ${LOCAL_TEST_DIR}/${test}Test2_cfg.py" $? + cmsRun ${SCRAM_TEST_PATH}/${test}Test2_cfg.py || die "cmsRun ${SCRAM_TEST_PATH}/${test}Test2_cfg.py" $? echo " " echo "RandomNumberGeneratorService multistream" @@ -63,8 +60,8 @@ pushd ${LOCAL_TMP_DIR} rm -rf stream1LastEvent.txt rm -rf stream2LastEvent.txt - cmsRun ${LOCAL_TEST_DIR}/testMultiStream_cfg.py > testMultiStreamDump.txt || die "cmsRun testMultiStream_cfg.py" $? - diff -I "TrackTSelector" ${LOCAL_TEST_DIR}/unit_test_outputs/testMultiStreamDump.txt testMultiStreamDump.txt || die "comparing testMultiStreamDump.txt" $? + cmsRun ${SCRAM_TEST_PATH}/testMultiStream_cfg.py > testMultiStreamDump.txt || die "cmsRun testMultiStream_cfg.py" $? + diff -I "TrackTSelector" ${SCRAM_TEST_PATH}/unit_test_outputs/testMultiStreamDump.txt testMultiStreamDump.txt || die "comparing testMultiStreamDump.txt" $? echo " " echo "RandomNumberGeneratorService multistream test replay from event" @@ -80,7 +77,7 @@ pushd ${LOCAL_TMP_DIR} rm -rf replaystream1LastEvent.txt rm -rf replaystream2LastEvent.txt - cmsRun ${LOCAL_TEST_DIR}/testMultiStreamReplay1_cfg.py || die "cmsRun testMultiStreamReplay1_cfg.py" $? + cmsRun ${SCRAM_TEST_PATH}/testMultiStreamReplay1_cfg.py || die "cmsRun testMultiStreamReplay1_cfg.py" $? # sort so this does not depend on module execution order sort testRandomServiceL1E3.txt > testRandomServiceL1E3.sorted @@ -126,14 +123,10 @@ pushd ${LOCAL_TMP_DIR} rm -rf replaystream1LastEvent.txt rm -rf replaystream2LastEvent.txt - cmsRun ${LOCAL_TEST_DIR}/testMultiStreamReplay2_cfg.py || die "cmsRun testMultiStreamReplay2_cfg.py" $? + cmsRun ${SCRAM_TEST_PATH}/testMultiStreamReplay2_cfg.py || die "cmsRun testMultiStreamReplay2_cfg.py" $? # sort so this does not depend on module execution order sort lastEvent.txt > lastEvent.sorted sort replaystream0LastEvent.txt > replayLastEvent.sorted diff lastEvent.sorted replayLastEvent.sorted || die "comparing files containing random numbers of last event in a stream" $? - -popd - -exit 0