diff --git a/Calorimeter/CaloTools/CMakeLists.txt b/Calorimeter/CaloTools/CMakeLists.txt index 1cbdf69e46bba5df2b307d57a01a85214a7db7d9..b17ea0371babdf8b672ed2ea2383634158324f37 100644 --- a/Calorimeter/CaloTools/CMakeLists.txt +++ b/Calorimeter/CaloTools/CMakeLists.txt @@ -62,3 +62,5 @@ atlas_add_component( CaloTools atlas_install_headers( CaloTools ) atlas_install_python_modules( python/*.py ) atlas_install_joboptions( share/*.py ) + +atlas_add_test( CaloNoiseToolConfigTest SCRIPT python -m CaloTools.CaloNoiseToolConfig POST_EXEC_SCRIPT nopost.sh ) diff --git a/Calorimeter/CaloTools/python/CaloNoiseToolConfig.py b/Calorimeter/CaloTools/python/CaloNoiseToolConfig.py index 7a2b3ac61439d2168b74573893302a9b12d14672..d3e6c0010ed0e80cc1703777dc35915274b90312 100644 --- a/Calorimeter/CaloTools/python/CaloNoiseToolConfig.py +++ b/Calorimeter/CaloTools/python/CaloNoiseToolConfig.py @@ -98,3 +98,19 @@ def CaloNoiseToolCfg(configFlags): result.addPublicTool(caloNoiseToolDB) return result,caloNoiseToolDB + +if __name__ == "__main__": + from AthenaCommon.Configurable import Configurable + Configurable.configurableRun3Behavior=1 + from AthenaConfiguration.AllConfigFlags import ConfigFlags + from AthenaConfiguration.TestDefaults import defaultTestFiles + + ConfigFlags.Input.Files = defaultTestFiles.RAW + ConfigFlags.lock() + + from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator + acc, caloNoiseToolDB = CaloNoiseToolCfg(ConfigFlags) + + f=open('test.pkl','w') + acc.store(f) + f.close() diff --git a/Control/AthenaConfiguration/python/TestDefaults.py b/Control/AthenaConfiguration/python/TestDefaults.py new file mode 100644 index 0000000000000000000000000000000000000000..2bb35cba74047609c1d7ddf78d720b938e920fc4 --- /dev/null +++ b/Control/AthenaConfiguration/python/TestDefaults.py @@ -0,0 +1,7 @@ +#Files for use in configuration unit tests + +class defaultTestFiles(): + RAW = ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1"] + RDO = ["myRDO.pool.root"]#needs a test RDO + AOD = ["myAOD.pool.root"]#needs a test AOD + ESD = ["myESD.pool.root"]#needs a test ESD diff --git a/Control/AthenaExamples/AthExHelloWorld/CMakeLists.txt b/Control/AthenaExamples/AthExHelloWorld/CMakeLists.txt index a4715cef98857d4408d298eaca8b97bced4b8d1e..fe06e5d007766bbfcbcc1cef9e571e88318b5be9 100644 --- a/Control/AthenaExamples/AthExHelloWorld/CMakeLists.txt +++ b/Control/AthenaExamples/AthExHelloWorld/CMakeLists.txt @@ -39,3 +39,5 @@ atlas_add_test( AthExHelloWorldMT_2 SCRIPT test/test_AthExHelloWorld.sh EXTRA_PATTERNS "AthenaHiveEventLoopMgr.* processing event" #processing order can change ) + +atlas_add_test( AthExHelloWorld_CfgTest SCRIPT python -m AthExHelloWorld.HelloWorldConfig POST_EXEC_SCRIPT nopost.sh ) diff --git a/Database/IOVDbSvc/CMakeLists.txt b/Database/IOVDbSvc/CMakeLists.txt index 2db732d1d100a8ae9a63cae0931db254a6559449..a350757663245a7806951c19b2e4f56c28b08195 100644 --- a/Database/IOVDbSvc/CMakeLists.txt +++ b/Database/IOVDbSvc/CMakeLists.txt @@ -59,3 +59,7 @@ atlas_add_test( IOVDbSvc_test PROPERTIES TIMEOUT 300 EXTRA_PATTERNS "^HistogramPersis.* INFO|^IOVSvc +DEBUG|^IOVSvcTool +DEBUG" ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" ) + +if( NOT SIMULATIONBASE ) + atlas_add_test( IOVDbSvcCfgTest SCRIPT python -m IOVDbSvc.IOVDbSvcConfig POST_EXEC_SCRIPT nopost.sh ) +endif() diff --git a/Database/IOVDbSvc/python/IOVDbSvcConfig.py b/Database/IOVDbSvc/python/IOVDbSvcConfig.py index 1882f05c1eb5963aac46e417986643c102365677..9164ca3db9dfd3e3ce5c203394aefa075605f292 100644 --- a/Database/IOVDbSvc/python/IOVDbSvcConfig.py +++ b/Database/IOVDbSvc/python/IOVDbSvcConfig.py @@ -218,3 +218,18 @@ def _extractFolder(folderstr): +if __name__ == "__main__": + from AthenaCommon.Configurable import Configurable + Configurable.configurableRun3Behavior=1 + from AthenaConfiguration.AllConfigFlags import ConfigFlags + from AthenaConfiguration.TestDefaults import defaultTestFiles + + ConfigFlags.Input.Files = defaultTestFiles.RAW + ConfigFlags.lock() + + from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator + acc, iovdbSvc = IOVDbSvcCfg(ConfigFlags) + + f=open('test.pkl','w') + acc.store(f) + f.close() diff --git a/DetectorDescription/GeoModel/AtlasGeoModel/CMakeLists.txt b/DetectorDescription/GeoModel/AtlasGeoModel/CMakeLists.txt index 007deace2241817ccef16cf26a017ec4ea803ef2..925b09354115d151b178410073192c580579b751 100644 --- a/DetectorDescription/GeoModel/AtlasGeoModel/CMakeLists.txt +++ b/DetectorDescription/GeoModel/AtlasGeoModel/CMakeLists.txt @@ -9,3 +9,6 @@ atlas_subdir( AtlasGeoModel ) atlas_install_python_modules( python/*.py ) atlas_install_joboptions( share/*.py ) +if( NOT SIMULATIONBASE ) + atlas_add_test( AtlasGeoModelConfig SCRIPT python -m AtlasGeoModel.GeoModelConfig POST_EXEC_SCRIPT nopost.sh ) +endif() diff --git a/DetectorDescription/GeoModel/AtlasGeoModel/python/GeoModelConfig.py b/DetectorDescription/GeoModel/AtlasGeoModel/python/GeoModelConfig.py index 10e3608c9015df4ab2502090e1d9a5bd6c93423a..21cb0f410a2a9178216daac1ec3efdab595096a0 100644 --- a/DetectorDescription/GeoModel/AtlasGeoModel/python/GeoModelConfig.py +++ b/DetectorDescription/GeoModel/AtlasGeoModel/python/GeoModelConfig.py @@ -1,4 +1,6 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaCommon.Configurable import Configurable +Configurable.configurableRun3Behavior=1 def GeoModelCfg(configFlags): version=configFlags.GeoModel.AtlasVersion @@ -32,3 +34,17 @@ def GeoModelCfg(configFlags): #TagInfoMgr used by GeoModelSvc but no ServiceHandle. Relies on string-name return result,gms + + + +if __name__ == "__main__": + from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator + acc = ComponentAccumulator() + from AthenaConfiguration.AllConfigFlags import ConfigFlags + from AthenaConfiguration.TestDefaults import defaultTestFiles + + ConfigFlags.Input.Files = defaultTestFiles.RAW + + acc, gms = GeoModelCfg( ConfigFlags ) + acc.store( file( "test.pkl", "w" ) ) + print "All OK" diff --git a/DetectorDescription/RegionSelector/python/RegSelConfig.py b/DetectorDescription/RegionSelector/python/RegSelConfig.py index d6d64d5d7ffe102653247f021afd3a0f3cb8f9c3..0570abc3a029dc5267db9a982b1a122f2c1e38e8 100644 --- a/DetectorDescription/RegionSelector/python/RegSelConfig.py +++ b/DetectorDescription/RegionSelector/python/RegSelConfig.py @@ -63,7 +63,9 @@ if __name__ == "__main__": from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator acc = ComponentAccumulator() 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"] + from AthenaConfiguration.TestDefaults import defaultTestFiles + + ConfigFlags.Input.Files = defaultTestFiles.RAW acc,regSel = RegSelConfig( ConfigFlags ) acc.store( file( "test.pkl", "w" ) ) diff --git a/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py b/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py index ebff37302f56e0520a9519c9f082ba3a9894ff79..d9e1c6676f07909d36ad7983254b44c69561f51a 100644 --- a/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py +++ b/Event/ByteStreamCnvSvc/python/ByteStreamConfig.py @@ -114,7 +114,9 @@ def TrigBSReadCfg( inputFlags ): if __name__ == "__main__": 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"] + from AthenaConfiguration.TestDefaults import defaultTestFiles + + ConfigFlags.Input.Files = defaultTestFiles.RAW acc = TrigBSReadCfg( ConfigFlags ) acc.store( file( "test.pkl", "w" ) ) diff --git a/Event/EventInfoMgt/CMakeLists.txt b/Event/EventInfoMgt/CMakeLists.txt index ea6b513297b7092ea68aadf6cdfafcbc779b3286..d51eef10d87ea4527e212ced8a7751d040e46b15 100644 --- a/Event/EventInfoMgt/CMakeLists.txt +++ b/Event/EventInfoMgt/CMakeLists.txt @@ -30,3 +30,4 @@ atlas_install_python_modules( python/*.py ) atlas_install_joboptions( share/EventInfoMgt_jobOptions.py share/TagInfoMgr_jobOptions.py ) atlas_install_scripts( share/dumpRunNumber.py ) +atlas_add_test( TagInfoMgrCfg SCRIPT python -m EventInfoMgt.TagInfoMgrConfig POST_EXEC_SCRIPT nopost.sh ) diff --git a/Event/EventInfoMgt/python/TagInfoMgrConfig.py b/Event/EventInfoMgt/python/TagInfoMgrConfig.py index fdd3de9bd9dadbf2ac4683627e822300f6c6df7c..c58114a9ae163d0b2a4f44492db80945097e8a1f 100644 --- a/Event/EventInfoMgt/python/TagInfoMgrConfig.py +++ b/Event/EventInfoMgt/python/TagInfoMgrConfig.py @@ -11,7 +11,7 @@ def TagInfoMgrCfg(configFlags,tagValuePairs=[]): result=ComponentAccumulator() - from EventInfoMgtConf import TagInfoMgr + from EventInfoMgt.EventInfoMgtConf import TagInfoMgr from SGComps.SGCompsConf import ProxyProviderSvc from GaudiSvc.GaudiSvcConf import EvtPersistencySvc @@ -33,3 +33,15 @@ def TagInfoMgrCfg(configFlags,tagValuePairs=[]): return result,tagInfoMgr +if __name__ == "__main__": + from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator + from AthenaConfiguration.AllConfigFlags import ConfigFlags + from AthenaConfiguration.TestDefaults import defaultTestFiles + + ConfigFlags.Input.Files = defaultTestFiles.RAW + ConfigFlags.lock() + + acc, tagInfoMgr = TagInfoMgrCfg( ConfigFlags ) + print tagInfoMgr + acc.store( file( "test.pkl", "w" ) ) + print "All OK" diff --git a/LArCalorimeter/LArCabling/CMakeLists.txt b/LArCalorimeter/LArCabling/CMakeLists.txt index 3d0de4a753755794277b277a2d91d8e33097e641..9b7337147390f2de0268b43ea8696e364dabb3e5 100644 --- a/LArCalorimeter/LArCabling/CMakeLists.txt +++ b/LArCalorimeter/LArCabling/CMakeLists.txt @@ -46,3 +46,6 @@ atlas_install_python_modules( python/*.py ) atlas_install_joboptions( share/*.py ) atlas_install_runtime( share/FEBtoRODfred_v10.data ) +if( NOT SIMULATIONBASE ) + atlas_add_test( LArCablingConfig SCRIPT python -m LArCabling.LArCablingConfig POST_EXEC_SCRIPT nopost.sh ) +endif() diff --git a/LArCalorimeter/LArCabling/python/LArCablingConfig.py b/LArCalorimeter/LArCabling/python/LArCablingConfig.py index 79cdaa28e1c583f61ef74f4cc29b1ac5d087d942..22004a58914acc66c634c1173b59349c54531829 100644 --- a/LArCalorimeter/LArCabling/python/LArCablingConfig.py +++ b/LArCalorimeter/LArCabling/python/LArCablingConfig.py @@ -37,3 +37,18 @@ def LArCalibIdMappingCfg(configFlags): return _larCablingCfg(configFlags,LArCalibLineMappingAlg,"/LAR/Identifier/CalibIdMap") +if __name__ == "__main__": + from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator + from AthenaConfiguration.AllConfigFlags import ConfigFlags + from AthenaCommon.Configurable import Configurable + Configurable.configurableRun3Behavior=1 + from AthenaConfiguration.TestDefaults import defaultTestFiles + + ConfigFlags.Input.Files = defaultTestFiles.RAW + ConfigFlags.lock() + + acc = LArOnOffIdMappingCfg( ConfigFlags )[0] + acc.merge(LArFebRodMappingCfg(ConfigFlags)[0]) + acc.merge(LArCalibIdMappingCfg(ConfigFlags)[0]) + acc.store( file( "test.pkl", "w" ) ) + print "All OK" diff --git a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/CMakeLists.txt index 53f4892c323570917c97d05fa0bd0b45da0250fb..581fc4239833e9b63ee69f18f4d3d81ac969de01 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/CMakeLists.txt +++ b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/CMakeLists.txt @@ -41,3 +41,7 @@ atlas_add_component( LArGeoAlgsNV # Install files from the package: atlas_install_headers( LArGeoAlgsNV ) atlas_install_python_modules( python/*.py ) + +if( NOT SIMULATIONBASE ) + atlas_add_test( LArGMConfigTest SCRIPT python -m LArGeoAlgsNV.LArGMConfig POST_EXEC_SCRIPT nopost.sh ) +endif() diff --git a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/python/LArGMConfig.py b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/python/LArGMConfig.py index 395edf7d0b2777d2ba8c3b35aedc42a8709889ec..6debae0936cc3e84a122af468c56663bf2a5e055 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/python/LArGMConfig.py +++ b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/python/LArGMConfig.py @@ -23,3 +23,18 @@ def LArGMCfg(configFlags): return result + +if __name__ == "__main__": + from AthenaCommon.Configurable import Configurable + Configurable.configurableRun3Behavior=1 + from AthenaConfiguration.AllConfigFlags import ConfigFlags + from AthenaConfiguration.TestDefaults import defaultTestFiles + + ConfigFlags.Input.Files = defaultTestFiles.RAW + ConfigFlags.lock() + + from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator + acc = LArGMCfg(ConfigFlags) + f=open('LArGMCfg.pkl','w') + acc.store(f) + f.close() diff --git a/MagneticField/MagFieldServices/CMakeLists.txt b/MagneticField/MagFieldServices/CMakeLists.txt index e133e297e620c6889056c2ecbda7aa15a92639ad..8e932c8cb6dad22e0cc24c89f91f7c3c218da883 100644 --- a/MagneticField/MagFieldServices/CMakeLists.txt +++ b/MagneticField/MagFieldServices/CMakeLists.txt @@ -29,3 +29,7 @@ atlas_add_component( MagFieldServices # Install files from the package: atlas_install_headers( MagFieldServices ) atlas_install_python_modules( python/*.py ) + +if( NOT SIMULATIONBASE ) + atlas_add_test( MagFieldServicesConfig SCRIPT python -m MagFieldServices.MagFieldServicesConfig POST_EXEC_SCRIPT nopost.sh ) +endif() diff --git a/MagneticField/MagFieldServices/python/MagFieldServicesConfig.py b/MagneticField/MagFieldServices/python/MagFieldServicesConfig.py index c26d27057547ac98425657f14e1d8b25e72dc564..f0c0a24f41f8bebcb7e2fa57285006d88de4eb68 100644 --- a/MagneticField/MagFieldServices/python/MagFieldServicesConfig.py +++ b/MagneticField/MagFieldServices/python/MagFieldServicesConfig.py @@ -79,7 +79,9 @@ if __name__=="__main__": from AthenaConfiguration.AllConfigFlags import ConfigFlags log.setLevel(VERBOSE) - ConfigFlags.Input.Files = ["myESD.pool.root"] + from AthenaConfiguration.TestDefaults import defaultTestFiles + + ConfigFlags.Input.Files = defaultTestFiles.RAW ConfigFlags.Input.isMC = False ConfigFlags.lock() diff --git a/MuonSpectrometer/MuonConfig/python/MuonBytestreamDecodeConfig.py b/MuonSpectrometer/MuonConfig/python/MuonBytestreamDecodeConfig.py index 73c96b004333687ee7eee65700e5a8129171f47f..64bd649a9beee70fbe516d98f1d96713a8c43f1f 100644 --- a/MuonSpectrometer/MuonConfig/python/MuonBytestreamDecodeConfig.py +++ b/MuonSpectrometer/MuonConfig/python/MuonBytestreamDecodeConfig.py @@ -53,7 +53,9 @@ if __name__=="__main__": 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"] + from AthenaConfiguration.TestDefaults import defaultTestFiles + + ConfigFlags.Input.Files = defaultTestFiles.RAW # Set global tag by hand for now ConfigFlags.IOVDb.GlobalTag = "CONDBR2-BLKPA-2018-13"#"CONDBR2-BLKPA-2015-17" ConfigFlags.GeoModel.AtlasVersion = "ATLAS-R2-2016-01-00-01"#"ATLAS-R2-2015-03-01-00" diff --git a/MuonSpectrometer/MuonConfig/python/MuonCablingConfig.py b/MuonSpectrometer/MuonConfig/python/MuonCablingConfig.py index 9c1d6b12b3f5ce0b12d057b8aa184a4db958b315..10e536543b942d47295b1f0230a1cf45097b3444 100644 --- a/MuonSpectrometer/MuonConfig/python/MuonCablingConfig.py +++ b/MuonSpectrometer/MuonConfig/python/MuonCablingConfig.py @@ -76,7 +76,10 @@ if __name__ == '__main__': 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"] + from AthenaConfiguration.AllConfigFlags import ConfigFlags + from AthenaConfiguration.TestDefaults import defaultTestFiles + + ConfigFlags.Input.Files = defaultTestFiles.RAW ConfigFlags.lock() from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator diff --git a/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py b/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py index fb6fa7762deb6915be2670f4f4297661bcce0e54..ca3d670956dd6705f242236f3bd429069ebb3e5b 100644 --- a/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py +++ b/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py @@ -42,7 +42,9 @@ def muonRdoDecodeTestData(): 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"] + from AthenaConfiguration.TestDefaults import defaultTestFiles + + ConfigFlags.Input.Files = defaultTestFiles.RAW # Set global tag by hand for now ConfigFlags.IOVDb.GlobalTag = "CONDBR2-BLKPA-2018-13"#"CONDBR2-BLKPA-2015-17" ConfigFlags.GeoModel.AtlasVersion = "ATLAS-R2-2016-01-00-01"#"ATLAS-R2-2015-03-01-00" diff --git a/TileCalorimeter/TileConditions/python/TileConditionsConfig.py b/TileCalorimeter/TileConditions/python/TileConditionsConfig.py index f78bf1d9bb103b2c11b5d35c2714db72f0ac53b2..5827bd78724277b019a5266547e9b20b2d4320a3 100644 --- a/TileCalorimeter/TileConditions/python/TileConditionsConfig.py +++ b/TileCalorimeter/TileConditions/python/TileConditionsConfig.py @@ -118,9 +118,9 @@ def tileCondCfg( flags ): # acc.addToAppProperty('CreateSvc', [infoLoaderSvc.getFullName()] ) - cabligSvc = TileCablingSvc() - cabligSvc.CablingType = 4 - acc.addService( cabligSvc ) + cablingSvc = TileCablingSvc() + cablingSvc.CablingType = 4 + acc.addService( cablingSvc ) return acc @@ -128,8 +128,9 @@ if __name__ == "__main__": from AthenaCommon.Configurable import Configurable Configurable.configurableRun3Behavior=1 from AthenaConfiguration.AllConfigFlags import ConfigFlags + from AthenaConfiguration.TestDefaults import defaultTestFiles - 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.Input.Files = defaultTestFiles.RAW ConfigFlags.lock() from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator diff --git a/TileCalorimeter/TileGeoModel/CMakeLists.txt b/TileCalorimeter/TileGeoModel/CMakeLists.txt index 79a974a973a43092d1dfcf719ce58c572db3ab15..06634042e0998522689a161968f977986bb04ccc 100644 --- a/TileCalorimeter/TileGeoModel/CMakeLists.txt +++ b/TileCalorimeter/TileGeoModel/CMakeLists.txt @@ -47,3 +47,7 @@ atlas_install_joboptions( share/*.py ) atlas_install_python_modules( python/*.py ) +if( NOT SIMULATIONBASE ) + atlas_add_test( TileGMConfig SCRIPT python -m TileGeoModel.TileGMConfig POST_EXEC_SCRIPT nopost.sh ) +endif() + diff --git a/TileCalorimeter/TileGeoModel/python/TileGMConfig.py b/TileCalorimeter/TileGeoModel/python/TileGMConfig.py index 515493230275e8280027ae902d8270901740cc6b..e8e1b464b845b75e986fe8a6bc3bc913eb132c1f 100644 --- a/TileCalorimeter/TileGeoModel/python/TileGMConfig.py +++ b/TileCalorimeter/TileGeoModel/python/TileGMConfig.py @@ -1,5 +1,7 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AtlasGeoModel.GeoModelConfig import GeoModelCfg +from AthenaCommon.Configurable import Configurable +Configurable.configurableRun3Behavior=1 def TileGMCfg(configFlags): result,gms=GeoModelCfg(configFlags) @@ -10,3 +12,16 @@ def TileGMCfg(configFlags): result.addService(gms) return result + + +if __name__ == "__main__": + from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator + from AthenaConfiguration.AllConfigFlags import ConfigFlags + from AthenaConfiguration.TestDefaults import defaultTestFiles + + ConfigFlags.Input.Files = defaultTestFiles.RAW + ConfigFlags.lock() + + acc = TileGMCfg( ConfigFlags ) + acc.store( file( "test.pkl", "w" ) ) + print "All OK" diff --git a/Tracking/TrkDetDescr/TrkDetDescrSvc/CMakeLists.txt b/Tracking/TrkDetDescr/TrkDetDescrSvc/CMakeLists.txt index e2daf953dcf300a59ae76d4f8a34e9835cb2d7ea..537450ba474dccc0f57dbdbc40939aa9ba86a039 100644 --- a/Tracking/TrkDetDescr/TrkDetDescrSvc/CMakeLists.txt +++ b/Tracking/TrkDetDescr/TrkDetDescrSvc/CMakeLists.txt @@ -37,3 +37,5 @@ atlas_add_component( TrkDetDescrSvc # Install files from the package: atlas_install_python_modules( python/*.py ) +atlas_add_test( AtlasTrackingGeometrySvcCfgTest SCRIPT python -m TrkDetDescrSvc.AtlasTrackingGeometrySvcConfig POST_EXEC_SCRIPT nopost.sh ) + diff --git a/Tracking/TrkDetDescr/TrkDetDescrSvc/python/AtlasTrackingGeometrySvcConfig.py b/Tracking/TrkDetDescr/TrkDetDescrSvc/python/AtlasTrackingGeometrySvcConfig.py index 23de5096793fa3deb44a69298e09865627073dc9..4022650a844db858f0b76b218968870b574f4c03 100644 --- a/Tracking/TrkDetDescr/TrkDetDescrSvc/python/AtlasTrackingGeometrySvcConfig.py +++ b/Tracking/TrkDetDescr/TrkDetDescrSvc/python/AtlasTrackingGeometrySvcConfig.py @@ -85,15 +85,14 @@ if __name__ == '__main__': from AthenaCommon.Configurable import Configurable Configurable.configurableRun3Behavior=1 from AthenaConfiguration.AllConfigFlags import ConfigFlags + from AthenaConfiguration.TestDefaults import defaultTestFiles - 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.Input.Files = defaultTestFiles.RAW ConfigFlags.lock() from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator - result = ComponentAccumulator() acc, tracking_geometry_service = TrackingGeometrySvcCfg(ConfigFlags ) - result.merge(acc) f=open('TrackingGeometrySvcCfg.pkl','w') acc.store(f)