From 1404dd88f624304292405a3f31ed8fcc5552eacf Mon Sep 17 00:00:00 2001
From: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Date: Thu, 17 Dec 2020 14:41:11 +0100
Subject: [PATCH] Made AthenaConfiguration compatible with AthAnalysis.

---
 Control/AthenaConfiguration/CMakeLists.txt    | 24 +++++++++----------
 .../python/AutoConfigFlags.py                 |  2 +-
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/Control/AthenaConfiguration/CMakeLists.txt b/Control/AthenaConfiguration/CMakeLists.txt
index fd94dd784b9c..dc6084e7b04f 100644
--- a/Control/AthenaConfiguration/CMakeLists.txt
+++ b/Control/AthenaConfiguration/CMakeLists.txt
@@ -4,30 +4,31 @@
 atlas_subdir( AthenaConfiguration )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py python/iconfTool 
+atlas_install_python_modules( python/*.py python/iconfTool
                               POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_scripts( share/confTool.py python/iconfTool/iconfTool python/CARunner.py)
 
-atlas_add_test( ComponentAccumulatorTest
-   SCRIPT python -m unittest -v AthenaConfiguration.ComponentAccumulatorTest
-   POST_EXEC_SCRIPT nopost.sh )
-
-
 atlas_add_test( AthConfigFlagsTest
    SCRIPT python -m unittest AthenaConfiguration.AthConfigFlags
    POST_EXEC_SCRIPT nopost.sh )
 
-atlas_add_test( AllConfigFlagsTest_EVNT_test
-                SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/python/testAllConfigFlags_EVNT.py
-                PROPERTIES TIMEOUT 300  )
+if( NOT XAOD_ANALYSIS )
+   atlas_add_test( ComponentAccumulatorTest
+      SCRIPT python -m unittest -v AthenaConfiguration.ComponentAccumulatorTest
+      POST_EXEC_SCRIPT nopost.sh )
 
-if( NOT GENERATIONBASE )
+   atlas_add_test( AllConfigFlagsTest_EVNT_test
+      SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/python/testAllConfigFlags_EVNT.py
+      PROPERTIES TIMEOUT 300  )
+endif()
+
+if( NOT GENERATIONBASE AND NOT XAOD_ANALYSIS )
     atlas_add_test( AllConfigFlagsTest_HITS_test
                     SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/python/testAllConfigFlags_HITS.py
                     PROPERTIES TIMEOUT 300  )
 endif()
 
-if( NOT SIMULATIONBASE AND NOT GENERATIONBASE )
+if( NOT SIMULATIONBASE AND NOT GENERATIONBASE AND NOT XAOD_ANALYSIS )
     atlas_add_test( AllConfigFlagsTest_RDO_test
                     SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/python/testAllConfigFlags_RDO.py
                     PROPERTIES TIMEOUT 300  )
@@ -36,4 +37,3 @@ if( NOT SIMULATIONBASE AND NOT GENERATIONBASE )
                     SCRIPT python -m AthenaConfiguration.AllConfigFlags
                     POST_EXEC_SCRIPT nopost.sh )
 endif()
-
diff --git a/Control/AthenaConfiguration/python/AutoConfigFlags.py b/Control/AthenaConfiguration/python/AutoConfigFlags.py
index cc58a4fb4b8a..5ac59444e947 100644
--- a/Control/AthenaConfiguration/python/AutoConfigFlags.py
+++ b/Control/AthenaConfiguration/python/AutoConfigFlags.py
@@ -1,7 +1,6 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 from PyUtils.MetaReader import read_metadata
-from AtlasGeoModel.AtlasGeoDBInterface import AtlasGeoDBInterface
 from AthenaCommon.Logging import logging
 from functools import lru_cache
 
@@ -33,6 +32,7 @@ def _initializeGeometryParameters(geoTag):
     from PixelGeoModel import PixelGeoDB
     from LArGeoAlgsNV import LArGeoDB
     from MuonGeoModel import MuonGeoDB
+    from AtlasGeoModel.AtlasGeoDBInterface import AtlasGeoDBInterface
 
     dbGeomCursor = AtlasGeoDBInterface(geoTag)
     dbGeomCursor.ConnectAndBrowseGeoDB()
-- 
GitLab