diff --git a/gui/fitpanel/test/CMakeLists.txt b/gui/fitpanel/test/CMakeLists.txt index 8c036a4fb6580..6141c3950e432 100644 --- a/gui/fitpanel/test/CMakeLists.txt +++ b/gui/fitpanel/test/CMakeLists.txt @@ -7,5 +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") -target_include_directories(fitPanelUnitTesting PRIVATE ../src/) + +# 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() 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");