From 594e8329a4ffae8b5df7a0e61c6ac634c33c43a8 Mon Sep 17 00:00:00 2001 From: Jonas Rembser Date: Tue, 6 Jan 2026 15:55:11 +0100 Subject: [PATCH 1/3] [RF][HF] Remove fallback in testHistFactory to lookup inputs in ROOTSYS The input files for `testHistFactory` are always copied to the directory where the tests are run by CMake. --- roofit/histfactory/test/testHistFactory.cxx | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/roofit/histfactory/test/testHistFactory.cxx b/roofit/histfactory/test/testHistFactory.cxx index f66f1ce0a0b39..ec0aee3fc4dcf 100644 --- a/roofit/histfactory/test/testHistFactory.cxx +++ b/roofit/histfactory/test/testHistFactory.cxx @@ -89,10 +89,6 @@ TEST(HistFactory, Read_ROOT6_16_Model) std::string filename = "./ref_6.16_example_UsingC_channel1_meas_model.root"; std::unique_ptr file(TFile::Open(filename.c_str())); - if (!file || !file->IsOpen()) { - filename = TROOT::GetRootSys() + "/roofit/histfactory/test/" + filename; - file.reset(TFile::Open(filename.c_str())); - } ASSERT_TRUE(file && file->IsOpen()); RooWorkspace *ws; @@ -118,10 +114,6 @@ TEST(HistFactory, Read_ROOT6_16_Combined_Model) std::string filename = "./ref_6.16_example_UsingC_combined_meas_model.root"; std::unique_ptr file(TFile::Open(filename.c_str())); - if (!file || !file->IsOpen()) { - filename = TROOT::GetRootSys() + "/roofit/histfactory/test/" + filename; - file.reset(TFile::Open(filename.c_str())); - } ASSERT_TRUE(file && file->IsOpen()); RooWorkspace *ws; @@ -143,7 +135,12 @@ TEST(HistFactory, Read_ROOT6_16_Combined_Model) /// What kind of model is set up. Use this to instantiate /// a test suite. -enum class MakeModelMode { OverallSyst, HistoSyst, StatSyst, ShapeSyst }; +enum class MakeModelMode { + OverallSyst, + HistoSyst, + StatSyst, + ShapeSyst +}; using HFTestParam = std::tuple; @@ -695,7 +692,7 @@ INSTANTIATE_TEST_SUITE_P( HistFactory, HFFixture, testing::Combine(testing::Values(MakeModelMode::OverallSyst, MakeModelMode::HistoSyst, MakeModelMode::StatSyst, MakeModelMode::ShapeSyst), - testing::Values(false, true), // non-uniform bins or not + testing::Values(false, true), // non-uniform bins or not testing::Values(RooFit::EvalBackend::Cpu())), // dummy because no NLL is created [](testing::TestParamInfo const ¶mInfo) { return getName(paramInfo.param, true); }); From 02a9c2ec70be1af1bb23c6c019c0e14d7918df62 Mon Sep 17 00:00:00 2001 From: Jonas Rembser Date: Tue, 6 Jan 2026 16:28:37 +0100 Subject: [PATCH 2/3] [test] Avoid adding unneeded extra interpreter args in some tests This is done in particular to avoid some usage of `GetRootSys()`. --- test/bench.cxx | 3 --- test/stress.cxx | 3 --- test/stressIOPlugins.cxx | 3 --- test/stressMathCore.cxx | 3 --- 4 files changed, 12 deletions(-) diff --git a/test/bench.cxx b/test/bench.cxx index 1a0019beda24a..cb3efee566448 100644 --- a/test/bench.cxx +++ b/test/bench.cxx @@ -112,9 +112,6 @@ template TBenchData runTest(const char *name, int nevents, int nhit int main(int argc, char **argv) { - std::string inclRootSys = ("-I" + TROOT::GetRootSys() + "/test").Data(); - TROOT::AddExtraInterpreterArgs({inclRootSys}); - bool writereferences = false; bool memberwise = false; bool shortrun = false; diff --git a/test/stress.cxx b/test/stress.cxx index 8741a54de4b43..47cd0884eecc3 100644 --- a/test/stress.cxx +++ b/test/stress.cxx @@ -123,9 +123,6 @@ void cleanup(); int main(int argc, char **argv) { - std::string inclRootSys = ("-I" + TROOT::GetRootSys() + "/test").Data(); - TROOT::AddExtraInterpreterArgs({inclRootSys}); - gROOT->SetBatch(); TApplication theApp("App", &argc, argv); gBenchmark = new TBenchmark(); diff --git a/test/stressIOPlugins.cxx b/test/stressIOPlugins.cxx index 8aa64734a0ffb..a8562a2e59017 100644 --- a/test/stressIOPlugins.cxx +++ b/test/stressIOPlugins.cxx @@ -89,9 +89,6 @@ void cleanup(); int main(int argc, char **argv) { - std::string inclRootSys = ("-I" + TROOT::GetRootSys() + "/test").Data(); - TROOT::AddExtraInterpreterArgs({inclRootSys}); - gROOT->SetBatch(); TApplication theApp("App", &argc, argv); const char *proto = 0; diff --git a/test/stressMathCore.cxx b/test/stressMathCore.cxx index ccc417e5bff50..077e8cad5afe8 100644 --- a/test/stressMathCore.cxx +++ b/test/stressMathCore.cxx @@ -1563,9 +1563,6 @@ int stressMathCore(double nscale = 1) { int main(int argc,const char *argv[]) { - std::string inclRootSys = ("-I" + TROOT::GetRootSys() + "/test").Data(); - TROOT::AddExtraInterpreterArgs({inclRootSys}); - double nscale = 1; if (argc > 1) { nscale = atof(argv[1]); From 59c9d825d6160d85754dd9f643170617442acdb9 Mon Sep 17 00:00:00 2001 From: Jonas Rembser Date: Tue, 6 Jan 2026 16:35:25 +0100 Subject: [PATCH 3/3] [test] Don't repeatedly include `` header in stressInterpreter It's not good to include the standard headers in a loop, and actually causes the test to fail in my environment by somehow causing symbol lookup failures. The errors are fixed by just not including ``, which is not necessary in Cling anyway. --- test/stressInterpreter.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/stressInterpreter.cxx b/test/stressInterpreter.cxx index 704b270c0638a..fa3faae23891f 100644 --- a/test/stressInterpreter.cxx +++ b/test/stressInterpreter.cxx @@ -224,8 +224,7 @@ bool InterpreterStress::stressSTLDict() { int res = 3; TInterpreter::EErrorCode interpError = TInterpreter::kNoError; TString cmd - = TString::Format("#include \n" - "class MyClass;\n" + = TString::Format("class MyClass;\n" "typedef MyClass* Klass%d_t;\n" "std::vector v%d;\n" "void stressInterpreter_tmp%d() {\n"