From dd0b1df8c416257448171f60f25ed12b3c86a9f7 Mon Sep 17 00:00:00 2001 From: Stewart Martin-Haugh <smh@cern.ch> Date: Wed, 5 Dec 2018 12:19:19 +0100 Subject: [PATCH] New unit test for IOVDbSvc configuration --- Database/IOVDbSvc/CMakeLists.txt | 2 ++ Database/IOVDbSvc/python/IOVDbSvcConfig.py | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/Database/IOVDbSvc/CMakeLists.txt b/Database/IOVDbSvc/CMakeLists.txt index 2db732d1d10..a7ff2fcc704 100644 --- a/Database/IOVDbSvc/CMakeLists.txt +++ b/Database/IOVDbSvc/CMakeLists.txt @@ -59,3 +59,5 @@ atlas_add_test( IOVDbSvc_test PROPERTIES TIMEOUT 300 EXTRA_PATTERNS "^HistogramPersis.* INFO|^IOVSvc +DEBUG|^IOVSvcTool +DEBUG" ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" ) + +atlas_add_test( IOVDbSvcCfgTest SCRIPT python -m IOVDbSvc.IOVDbSvcConfig POST_EXEC_SCRIPT nopost.sh ) diff --git a/Database/IOVDbSvc/python/IOVDbSvcConfig.py b/Database/IOVDbSvc/python/IOVDbSvcConfig.py index 1882f05c1eb..9c5aa70806c 100644 --- a/Database/IOVDbSvc/python/IOVDbSvcConfig.py +++ b/Database/IOVDbSvc/python/IOVDbSvcConfig.py @@ -218,3 +218,17 @@ def _extractFolder(folderstr): +if __name__ == "__main__": + from AthenaCommon.Configurable import Configurable + Configurable.configurableRun3Behavior=1 + from AthenaConfiguration.AllConfigFlags import ConfigFlags + + ConfigFlags.Input.Files =["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1"] + ConfigFlags.lock() + + from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator + acc, iovdbSvc = IOVDbSvcCfg(ConfigFlags) + + f=open('test.pkl','w') + acc.store(f) + f.close() -- GitLab