diff --git a/Control/AthenaConfiguration/CMakeLists.txt b/Control/AthenaConfiguration/CMakeLists.txt
index fd94dd784b9c373c3bf20b1338e88ff0a18f4fa3..dc6084e7b04f7003639bdbe2f13d8919d5a1c34e 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 cc58a4fb4b8a4e48c1f70bb960b5d66a69ebd7a8..5ac59444e9470ff9c1e041c07d5694ce64304c22 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()