From 401f4e1def6348cc482153d55ab5993329ce6061 Mon Sep 17 00:00:00 2001
From: Florian Uhlig <f.uhlig@gsi.de>
Date: Mon, 31 Aug 2020 09:45:18 +0200
Subject: [PATCH] Fix crashing test macros

Properly remove the GeoManger before leaving the ROOT session.
---
 .../common/analysis_tree_converter/run_analysis_tree_maker.C    | 2 ++
 macro/much/run_ana.C                                            | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/macro/analysis/common/analysis_tree_converter/run_analysis_tree_maker.C b/macro/analysis/common/analysis_tree_converter/run_analysis_tree_maker.C
index d5d20940ec..8e9c9f94bd 100644
--- a/macro/analysis/common/analysis_tree_converter/run_analysis_tree_maker.C
+++ b/macro/analysis/common/analysis_tree_converter/run_analysis_tree_maker.C
@@ -165,4 +165,6 @@ void run_analysis_tree_maker(Int_t nEvents     = 2,
   std::cout << " All ok " << std::endl;
   //   Generate_CTest_Dependency_File(depFile);
   // ------------------------------------------------------------------------
+
+  RemoveGeoManager();
 }
diff --git a/macro/much/run_ana.C b/macro/much/run_ana.C
index 9c1c561a1f..ba7b4d2baa 100644
--- a/macro/much/run_ana.C
+++ b/macro/much/run_ana.C
@@ -92,5 +92,5 @@ void run_ana(Int_t nEvents   = 3,
   cout << " Test passed" << endl;
   cout << " All ok " << endl;
 
-  //   RemoveGeoManager();
+  RemoveGeoManager();
 }
-- 
GitLab