From 2900cc30d4c1a664f7c4791db6e1cca69ee84950 Mon Sep 17 00:00:00 2001 From: Sergey Linev Date: Thu, 23 Apr 2026 10:58:15 +0200 Subject: [PATCH 1/2] [fitpanel] disable TestTree1D only in batch Provide full include path to let run macro directly --- gui/fitpanel/test/CMakeLists.txt | 1 - gui/fitpanel/test/UnitTesting.cxx | 12 ++++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gui/fitpanel/test/CMakeLists.txt b/gui/fitpanel/test/CMakeLists.txt index 8c036a4fb6580..a330a71c5e26e 100644 --- a/gui/fitpanel/test/CMakeLists.txt +++ b/gui/fitpanel/test/CMakeLists.txt @@ -8,4 +8,3 @@ ROOT_EXECUTABLE(fitPanelUnitTesting UnitTesting.cxx LIBRARIES FitPanel Gui Tree Hist MathCore) ROOT_ADD_TEST(test-fitpanel-UnitTesting COMMAND fitPanelUnitTesting -b FAILREGEX "FAILED|Error in") -target_include_directories(fitPanelUnitTesting PRIVATE ../src/) diff --git a/gui/fitpanel/test/UnitTesting.cxx b/gui/fitpanel/test/UnitTesting.cxx index bd6ef35bd9d3e..f4d47b69ec599 100644 --- a/gui/fitpanel/test/UnitTesting.cxx +++ b/gui/fitpanel/test/UnitTesting.cxx @@ -25,7 +25,7 @@ #include #include -#include "CommonDefs.h" +#include "../src/CommonDefs.h" #ifdef WIN32 #include "io.h" @@ -217,11 +217,15 @@ class FitEditorUnitTesting result += MakeTest("TestUpdateTree.....", &FitEditorUnitTesting::TestUpdateTree); - // result += MakeTest("TestTree1D.........", &FitEditorUnitTesting::TestTree1D); // TODO reenable once stack smashing issue is fixed + // TODO: reenable in batch once stack smashing issue is fixed + if (!gROOT->IsBatch()) + result += MakeTest("TestTree1D.........", &FitEditorUnitTesting::TestTree1D); - // result += MakeTest("TestTree2D.........", &FitEditorUnitTesting::TestTree2D); // TODO reenable once fit results are fixed + // TODO: reenable once fit results are fixed + // result += MakeTest("TestTree2D.........", &FitEditorUnitTesting::TestTree2D); - // result += MakeTest("TestTreeND.........", &FitEditorUnitTesting::TestTreeND); // TODO reenable once fit results are fixed + // TODO: reenable once fit results are fixed + // result += MakeTest("TestTreeND.........", &FitEditorUnitTesting::TestTreeND); fprintf(out, "\nRemember to also check outputUnitTesting.txt for " "more detailed information\n\n"); From be50179ff392e765657e8249cd0055e6bc2b862e Mon Sep 17 00:00:00 2001 From: Sergey Linev Date: Thu, 23 Apr 2026 13:46:53 +0200 Subject: [PATCH 2/2] Run fitpanel inside xvfb It is utility which emulates X11 on display-less environment --- gui/fitpanel/test/CMakeLists.txt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gui/fitpanel/test/CMakeLists.txt b/gui/fitpanel/test/CMakeLists.txt index a330a71c5e26e..6141c3950e432 100644 --- a/gui/fitpanel/test/CMakeLists.txt +++ b/gui/fitpanel/test/CMakeLists.txt @@ -7,4 +7,15 @@ # @author Danilo Piparo CERN ROOT_EXECUTABLE(fitPanelUnitTesting UnitTesting.cxx LIBRARIES FitPanel Gui Tree Hist MathCore) -ROOT_ADD_TEST(test-fitpanel-UnitTesting COMMAND fitPanelUnitTesting -b FAILREGEX "FAILED|Error in") + +# batch usage is instable - need more investigations +#ROOT_ADD_TEST(test-fitpanel-UnitTesting-batch COMMAND fitPanelUnitTesting -b FAILREGEX "FAILED|Error in") + +find_program(XVFB_RUN_EXECUTABLE NAMES xvfb-run) + +if(XVFB_RUN_EXECUTABLE) + ROOT_ADD_TEST(test-fitpanel-UnitTesting-xvfb + COMMAND ${XVFB_RUN_EXECUTABLE} --auto-servernum --server-args="-screen 0 1024x768x24" ./fitPanelUnitTesting + PASSRC 1 + FAILREGEX "FAILED|Error in") +endif()