From b4a7db810fb876c734173f72c849d467cb4d3c16 Mon Sep 17 00:00:00 2001
From: Stewart Martin-Haugh <smh@cern.ch>
Date: Wed, 5 Dec 2018 17:42:03 +0100
Subject: [PATCH] Protect tests that won't work in AthSimulation

---
 Database/IOVDbSvc/CMakeLists.txt                          | 4 +++-
 DetectorDescription/GeoModel/AtlasGeoModel/CMakeLists.txt | 4 +++-
 LArCalorimeter/LArCabling/CMakeLists.txt                  | 4 +++-
 LArCalorimeter/LArGeoModel/LArGeoAlgsNV/CMakeLists.txt    | 4 +++-
 MagneticField/MagFieldServices/CMakeLists.txt             | 4 +++-
 TileCalorimeter/TileGeoModel/CMakeLists.txt               | 4 +++-
 6 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/Database/IOVDbSvc/CMakeLists.txt b/Database/IOVDbSvc/CMakeLists.txt
index a7ff2fcc704..a3507576632 100644
--- a/Database/IOVDbSvc/CMakeLists.txt
+++ b/Database/IOVDbSvc/CMakeLists.txt
@@ -60,4 +60,6 @@ atlas_add_test( IOVDbSvc_test
                 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 )
+if( NOT SIMULATIONBASE )
+  atlas_add_test( IOVDbSvcCfgTest SCRIPT python -m IOVDbSvc.IOVDbSvcConfig POST_EXEC_SCRIPT nopost.sh )
+endif()
diff --git a/DetectorDescription/GeoModel/AtlasGeoModel/CMakeLists.txt b/DetectorDescription/GeoModel/AtlasGeoModel/CMakeLists.txt
index ff704ac0089..925b0935411 100644
--- a/DetectorDescription/GeoModel/AtlasGeoModel/CMakeLists.txt
+++ b/DetectorDescription/GeoModel/AtlasGeoModel/CMakeLists.txt
@@ -9,4 +9,6 @@ atlas_subdir( AtlasGeoModel )
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
 
-atlas_add_test( AtlasGeoModelConfig    SCRIPT python -m AtlasGeoModel.GeoModelConfig POST_EXEC_SCRIPT nopost.sh )
+if( NOT SIMULATIONBASE )
+  atlas_add_test( AtlasGeoModelConfig    SCRIPT python -m AtlasGeoModel.GeoModelConfig POST_EXEC_SCRIPT nopost.sh )
+endif()
diff --git a/LArCalorimeter/LArCabling/CMakeLists.txt b/LArCalorimeter/LArCabling/CMakeLists.txt
index baf3f8a37fb..9b733714739 100644
--- a/LArCalorimeter/LArCabling/CMakeLists.txt
+++ b/LArCalorimeter/LArCabling/CMakeLists.txt
@@ -46,4 +46,6 @@ atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
 atlas_install_runtime( share/FEBtoRODfred_v10.data )
 
-atlas_add_test( LArCablingConfig    SCRIPT python -m LArCabling.LArCablingConfig POST_EXEC_SCRIPT nopost.sh )
+if( NOT SIMULATIONBASE )
+  atlas_add_test( LArCablingConfig    SCRIPT python -m LArCabling.LArCablingConfig POST_EXEC_SCRIPT nopost.sh )
+endif()
diff --git a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/CMakeLists.txt
index 662e7eb5340..581fc423983 100644
--- a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/CMakeLists.txt
+++ b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/CMakeLists.txt
@@ -42,4 +42,6 @@ atlas_add_component( LArGeoAlgsNV
 atlas_install_headers( LArGeoAlgsNV )
 atlas_install_python_modules( python/*.py )
 
-atlas_add_test( LArGMConfigTest SCRIPT python -m LArGeoAlgsNV.LArGMConfig POST_EXEC_SCRIPT nopost.sh )
+if( NOT SIMULATIONBASE )
+  atlas_add_test( LArGMConfigTest SCRIPT python -m LArGeoAlgsNV.LArGMConfig POST_EXEC_SCRIPT nopost.sh )
+endif()
diff --git a/MagneticField/MagFieldServices/CMakeLists.txt b/MagneticField/MagFieldServices/CMakeLists.txt
index e9229be676a..8e932c8cb6d 100644
--- a/MagneticField/MagFieldServices/CMakeLists.txt
+++ b/MagneticField/MagFieldServices/CMakeLists.txt
@@ -30,4 +30,6 @@ atlas_add_component( MagFieldServices
 atlas_install_headers( MagFieldServices )
 atlas_install_python_modules( python/*.py )
 
-atlas_add_test( MagFieldServicesConfig    SCRIPT python -m MagFieldServices.MagFieldServicesConfig POST_EXEC_SCRIPT nopost.sh )
+if( NOT SIMULATIONBASE )
+  atlas_add_test( MagFieldServicesConfig    SCRIPT python -m MagFieldServices.MagFieldServicesConfig POST_EXEC_SCRIPT nopost.sh )
+endif()
diff --git a/TileCalorimeter/TileGeoModel/CMakeLists.txt b/TileCalorimeter/TileGeoModel/CMakeLists.txt
index deb63398c13..06634042e09 100644
--- a/TileCalorimeter/TileGeoModel/CMakeLists.txt
+++ b/TileCalorimeter/TileGeoModel/CMakeLists.txt
@@ -47,5 +47,7 @@ atlas_install_joboptions( share/*.py )
 atlas_install_python_modules( python/*.py )
 
 
-atlas_add_test( TileGMConfig    SCRIPT python -m TileGeoModel.TileGMConfig POST_EXEC_SCRIPT nopost.sh )
+if( NOT SIMULATIONBASE )
+  atlas_add_test( TileGMConfig    SCRIPT python -m TileGeoModel.TileGMConfig POST_EXEC_SCRIPT nopost.sh )
+endif()
 
-- 
GitLab