Skip to content
Snippets Groups Projects
Commit 17e7ea79 authored by Scott Snyder's avatar Scott Snyder Committed by scott snyder
Browse files

SCT_ConditionsServices: Fix test.

Gaudi/Athena initialization should not be done from global ctors.
Add missing reference file.


Former-commit-id: e3a12ca0
parent 38b01c48
No related branches found
No related tags found
No related merge requests found
[==========] Running 8 tests from 1 test case.
[----------] Global test environment set-up.
ApplicationMgr SUCCESS
====================================================================================================================================
Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
running on karma on Thu Mar 2 10:05:17 2017
====================================================================================================================================
ApplicationMgr INFO Application Manager Configured successfully
EventLoopMgr WARNING Unable to locate service "EventSelector"
EventLoopMgr WARNING No events will be processed from external input.
HistogramPersis...WARNING Histograms saving not required.
ApplicationMgr INFO Application Manager Initialized successfully
ApplicationMgr Ready
ClassIDSvc INFO getRegistryEntries: read 3598 CLIDRegistry entries for module ALL
ClassIDSvc INFO getRegistryEntries: read 357 CLIDRegistry entries for module ALL
[----------] 8 tests from SCT_RODVetoSvc_test
[ RUN ] SCT_RODVetoSvc_test.Initialization
SCT_CablingSvc INFO Initialize SCT cabling SCT_Cabling-00-00-00
SCT_FillCabling... INFO Reading cabling from CORACOOL
[ OK ] SCT_RODVetoSvc_test.Initialization (2 ms)
[ RUN ] SCT_RODVetoSvc_test.Finalization
ClassIDSvc INFO getRegistryEntries: read 52 CLIDRegistry entries for module ALL
[ OK ] SCT_RODVetoSvc_test.Finalization (1 ms)
[ RUN ] SCT_RODVetoSvc_test.queryInterface
[ OK ] SCT_RODVetoSvc_test.queryInterface (0 ms)
[ RUN ] SCT_RODVetoSvc_test.canReportAbout
[ OK ] SCT_RODVetoSvc_test.canReportAbout (0 ms)
[ RUN ] SCT_RODVetoSvc_test.isGood
SCT_RODVetoSvc INFO No value found for isFilled in SG, assuming false
SCT_RODVetoSvc ERROR Can't find BadRODIdentifiers in StoreGate
SCT_RODVetoSvc WARNING Data structure could not be filled
[ OK ] SCT_RODVetoSvc_test.isGood (0 ms)
[ RUN ] SCT_RODVetoSvc_test.fillData
SCT_RODVetoSvc ERROR Can't find BadRODIdentifiers in StoreGate
[ OK ] SCT_RODVetoSvc_test.fillData (0 ms)
[ RUN ] SCT_RODVetoSvc_test.canFillDuringInitialization
[ OK ] SCT_RODVetoSvc_test.canFillDuringInitialization (0 ms)
[ RUN ] SCT_RODVetoSvc_test.isFilled
BadRODIdentifiers
2359552
SCT_RODVetoSvc INFO No value found for isFilled in SG, assuming false
SCT_RODVetoSvc INFO 1 RODs were declared bad
SCT_RODVetoSvc WARNING Your vetoed selection 0x240100 does not exist.
Recorded WH with key: isFilled and value: 1
SCT_RODVetoSvc INFO Structure successfully filled with 0 modules.
[ OK ] SCT_RODVetoSvc_test.isFilled (0 ms)
[----------] 8 tests from SCT_RODVetoSvc_test (3 ms total)
[----------] Global test environment tear-down
[==========] 8 tests from 1 test case ran. (58 ms total)
[ PASSED ] 8 tests.
......@@ -46,30 +46,27 @@
//#include "mock_CablingSvc.h"
#include "InDetIdentifier/SCT_ID.h"
// Needed every time an AthAlgorithm, AthAlgTool or AthService is instantiated
ISvcLocator* g_svcLoc = Gaudi::svcLocator();
// Needed for the setup of StorgateSvc
const SCT_ID * m_pHelper = new SCT_ID();
// Easy way to set up services
const ServiceLocatorHelper helper(*g_svcLoc, "HELPER");
// Set up a new StoreGateSvc instance named DetectorStore, as SCT_RODVetoSvc needs
IService* i_svc = helper.service("StoreGateSvc/DetectorStore", true /*queit*/ , true /*createIf*/);
StoreGateSvc* m_detStore = dynamic_cast<StoreGateSvc*> (i_svc);
StatusCode sc = m_detStore->record(m_pHelper, "SCT_ID");
// global test environment takes care of setting up Gaudi
class GaudiEnvironment : public ::testing::Environment {
protected:
virtual void SetUp() override {
ISvcLocator* g_svcLoc = Gaudi::svcLocator();
Athena_test::initGaudi(g_svcLoc);
// Needed for the setup of StorgateSvc
const SCT_ID * pHelper = new SCT_ID();
// Easy way to set up services
const ServiceLocatorHelper helper(*g_svcLoc, "HELPER");
// Set up a new StoreGateSvc instance named DetectorStore, as SCT_RODVetoSvc needs
IService* i_svc = helper.service("StoreGateSvc/DetectorStore", true /*queit*/ , true /*createIf*/);
StoreGateSvc* detStore = dynamic_cast<StoreGateSvc*> (i_svc);
StatusCode sc = detStore->record(pHelper, "SCT_ID");
}
};
......@@ -81,6 +78,7 @@ class SCT_RODVetoSvc_test: public ::testing::Test{
virtual void SetUp() override {
ISvcLocator* g_svcLoc = Gaudi::svcLocator();
m_svc = new SCT_RODVetoSvc("SCT_RODVetoSvc", g_svcLoc );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment