From 4e333843d6f5086f55fa06335e1e12e832f6e95e Mon Sep 17 00:00:00 2001 From: Sergey Linev Date: Thu, 7 Aug 2025 15:40:35 +0200 Subject: [PATCH 1/2] [roottest] remove test for no longer exists html Move convert.sh to core tests where it still used --- roottest/root/core/CMakeLists.txt | 5 +- .../MakeIndex_convert.sh => core/convert.sh} | 0 roottest/root/html/.rootrc | 1 - roottest/root/html/CMakeLists.txt | 19 ------ roottest/root/html/ClassInModule.ref | 6 -- roottest/root/html/FindSource.ref | 5 -- roottest/root/html/MakeIndex.eref | 2 - roottest/root/html/MakeIndex.oref | 6 -- roottest/root/html/MakeIndex.ref | 8 --- roottest/root/html/runClassInModule.C | 28 -------- roottest/root/html/runFindSource.C | 65 ------------------- roottest/root/html/runMakeIndex.C | 30 --------- 12 files changed, 2 insertions(+), 173 deletions(-) rename roottest/root/{html/MakeIndex_convert.sh => core/convert.sh} (100%) delete mode 100644 roottest/root/html/.rootrc delete mode 100644 roottest/root/html/CMakeLists.txt delete mode 100644 roottest/root/html/ClassInModule.ref delete mode 100644 roottest/root/html/FindSource.ref delete mode 100644 roottest/root/html/MakeIndex.eref delete mode 100644 roottest/root/html/MakeIndex.oref delete mode 100644 roottest/root/html/MakeIndex.ref delete mode 100644 roottest/root/html/runClassInModule.C delete mode 100644 roottest/root/html/runFindSource.C delete mode 100644 roottest/root/html/runMakeIndex.C diff --git a/roottest/root/core/CMakeLists.txt b/roottest/root/core/CMakeLists.txt index 49d143880c8f1..72d52d7d194a6 100644 --- a/roottest/root/core/CMakeLists.txt +++ b/roottest/root/core/CMakeLists.txt @@ -32,9 +32,8 @@ ROOTTEST_ADD_TEST(assertROOT8542 ROOTTEST_ADD_TEST(execStatusBitsCheck MACRO execStatusBitsCheck.C - OUTCNV ../html/MakeIndex_convert.sh - OUTREF execStatusBitsCheck.ref - ) + OUTCNV convert.sh + OUTREF execStatusBitsCheck.ref) add_test(NAME root_exe_exitStatus COMMAND $ "-e invalid" "--no_exist") set_property(TEST root_exe_exitStatus PROPERTY WILL_FAIL True) diff --git a/roottest/root/html/MakeIndex_convert.sh b/roottest/root/core/convert.sh similarity index 100% rename from roottest/root/html/MakeIndex_convert.sh rename to roottest/root/core/convert.sh diff --git a/roottest/root/html/.rootrc b/roottest/root/html/.rootrc deleted file mode 100644 index 6ebe75fd4ec5a..0000000000000 --- a/roottest/root/html/.rootrc +++ /dev/null @@ -1 +0,0 @@ -Rint.History: .root_hist diff --git a/roottest/root/html/CMakeLists.txt b/roottest/root/html/CMakeLists.txt deleted file mode 100644 index 0cb7b6e34c8e9..0000000000000 --- a/roottest/root/html/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -if(NOT html) - return() -endif() - -ROOTTEST_ADD_TEST(runClassInModule - MACRO runClassInModule.C - WILLFAIL - OUTREF ClassInModule.ref) - -ROOTTEST_ADD_TEST(runFindSource - MACRO runFindSource.C - WILLFAIL - OUTREF FindSource.ref) - -ROOTTEST_ADD_TEST(runMakeIndex - MACRO runMakeIndex.C - OUTCNV MakeIndex_convert.sh - OUTREF MakeIndex.oref - ERRREF MakeIndex.eref) diff --git a/roottest/root/html/ClassInModule.ref b/roottest/root/html/ClassInModule.ref deleted file mode 100644 index cddd697dc25bb..0000000000000 --- a/roottest/root/html/ClassInModule.ref +++ /dev/null @@ -1,6 +0,0 @@ - -Processing runClassInModule.C... - - All rights reserved, please read http://roofit.sourceforge.net/license.txt - -Error in : Unknown class 'INTENTIONALLY__BOGUS!'! diff --git a/roottest/root/html/FindSource.ref b/roottest/root/html/FindSource.ref deleted file mode 100644 index d69e13ab3ee89..0000000000000 --- a/roottest/root/html/FindSource.ref +++ /dev/null @@ -1,5 +0,0 @@ - -Processing runFindSource.C... - - All rights reserved, please read http://roofit.sourceforge.net/license.txt - diff --git a/roottest/root/html/MakeIndex.eref b/roottest/root/html/MakeIndex.eref deleted file mode 100644 index b868fc765483f..0000000000000 --- a/roottest/root/html/MakeIndex.eref +++ /dev/null @@ -1,2 +0,0 @@ -Info in : Initializing - this might take a while... -Info in : Initializing - DONE. diff --git a/roottest/root/html/MakeIndex.oref b/roottest/root/html/MakeIndex.oref deleted file mode 100644 index 8f3243f9f841e..0000000000000 --- a/roottest/root/html/MakeIndex.oref +++ /dev/null @@ -1,6 +0,0 @@ -Processing /Users/mato/Development/ROOT/root.git/roottest/root/html/runMakeIndex.C... - htmldoc/ListOfTypes.html - htmldoc/LibraryDependencies.html - htmldoc/ClassIndex.html - htmldoc/index.html - htmldoc/ClassHierarchy.html diff --git a/roottest/root/html/MakeIndex.ref b/roottest/root/html/MakeIndex.ref deleted file mode 100644 index 9f5f37401afe0..0000000000000 --- a/roottest/root/html/MakeIndex.ref +++ /dev/null @@ -1,8 +0,0 @@ -Processing runMakeIndex.C... -Info in : Initializing - this might take a while... -Info in : Initializing - DONE. - htmldoc/ListOfTypes.html - htmldoc/LibraryDependencies.html - htmldoc/ClassIndex.html - htmldoc/index.html - htmldoc/ClassHierarchy.html diff --git a/roottest/root/html/runClassInModule.C b/roottest/root/html/runClassInModule.C deleted file mode 100644 index 3b7ccb3b9d1e4..0000000000000 --- a/roottest/root/html/runClassInModule.C +++ /dev/null @@ -1,28 +0,0 @@ -void TestClass(THtml& h, const char* exp, const char* clname) { - TString act; - h.GetModuleNameForClass(act, TClass::GetClass(clname)); - if (act != exp) { - printf("FAIL: class %s should be in module %s but is in %s\n", - clname, exp, act.Data()); - } -} - -void runClassInModule() { - gErrorIgnoreLevel = kWarning; - THtml h; - h.LoadAllLibs(); - h.SetInputDir("$ROOTSYS"); - h.MakeClass("INTENTIONALLY__BOGUS!"); - - TestClass(h, "html", "THtml"); - TestClass(h, "core/base", "TObject"); - TestClass(h, "hist/hist", "TH1"); - TestClass(h, "hist/hist", "TH1F"); - TestClass(h, "math/mathcore", "TMath"); - TestClass(h, "core/base", "TParameter"); - TestClass(h, "math/genvector","ROOT::Math::LorentzVector >"); - TestClass(h, "tmva", "TMVA::FitterBase"); - TestClass(h, "roofit/roofitcore", "RooAbsReal"); - TestClass(h, "roofit/roostats", "RooStats::PointSetInterval"); - TestClass(h, "math/matrix", "TMatrixTSparse"); -} diff --git a/roottest/root/html/runFindSource.C b/roottest/root/html/runFindSource.C deleted file mode 100644 index 602a39f2f4871..0000000000000 --- a/roottest/root/html/runFindSource.C +++ /dev/null @@ -1,65 +0,0 @@ -void FindAny(bool found, const TString& fsname, TClass* cl, TString baseexpected, const char* ext, const char* tag) { - - if (baseexpected == "") { - baseexpected = cl->GetName(); - Ssiz_t posCol = baseexpected.First('<'); - if (posCol != -1) { - baseexpected.Remove(posCol, baseexpected.Length()); - } - posCol = baseexpected.Last(':'); - if (posCol != -1) { - baseexpected.Remove(0, posCol + 1); - } - baseexpected += ext; - } - - if (!found) { - if (baseexpected != "FAIL") { - printf("FAIL: %s file for class %s not found\n", tag, cl->GetName()); - } - return; - } else { - if (baseexpected == "FAIL") { - printf("FAIL: expected to not find %s file for class %s but got %s\n", - tag, cl->GetName(), fsname.Data()); - return; - } - } - if (!fsname.EndsWith(baseexpected)) { - printf("FAIL: class %s expected %s file %s, got %s\n", - cl->GetName(), tag, baseexpected.Data(), fsname.Data()); - return; - } -} - -void Find(THtml& h, TClass* cl, const char* hdr = "", const char* src = "") { - TString fsname; - Bool_t found = h.GetDeclFileName(cl, 1, fsname); - FindAny(found, fsname, cl, hdr, ".h", "declaration"); - - found = h.GetImplFileName(cl, 1, fsname); - FindAny(found, fsname, cl, src, ".cxx", "implementation"); -} - -void runFindSource() { - gErrorIgnoreLevel = kWarning; - THtml h; - h.SetInputDir("$ROOTSYS"); - - Find(h, TObject::Class()); - Find(h, TH1::Class()); - Find(h, TH1F::Class(), "TH1.h", "TH1.cxx"); - - Find(h, TClass::GetClass("TMath")); - - Find(h, TParameter::Class()); - - TClass* cl = TClass::GetClass("ROOT::Math::LorentzVector >"); - Find(h, cl, "", "FAIL"); - - Find(h, TClass::GetClass("TMVA::FitterBase")); - - Find(h, TClass::GetClass("RooAbsReal")); - Find(h, TClass::GetClass("RooStats::PointSetInterval")); - Find(h, TClass::GetClass("TMatrixTSparse")); -} diff --git a/roottest/root/html/runMakeIndex.C b/roottest/root/html/runMakeIndex.C deleted file mode 100644 index 5a53550d0061a..0000000000000 --- a/roottest/root/html/runMakeIndex.C +++ /dev/null @@ -1,30 +0,0 @@ -TString getSrcDir() { - TString rootsys("$ROOTSYS"); - gSystem->ExpandPathName(rootsys); - TString cfgLoc(rootsys + "/config/Makefile.config"); - ifstream cfgIn(cfgLoc); - if (!cfgIn) { - return rootsys; - } - TString line; - while (line.ReadLine(cfgIn)) { - if (line.BeginsWith("ROOT_SRCDIR")) { - Ssiz_t posRP = line.Index("realpath, "); - if (posRP != -1) { - line.Remove(0, posRP + 10); - line.Remove(line.Length() - 1); - } else { - line.Remove(0, 19); - } - return line; - } - } - return rootsys; -} - -void runMakeIndex() { - THtml h; - h.SetInputDir(getSrcDir()); - h.LoadAllLibs(); - h.MakeIndex(); -} From 7715d44684ae287c6033a866c3c793adf5bb8f08 Mon Sep 17 00:00:00 2001 From: Sergey Linev Date: Thu, 7 Aug 2025 15:47:47 +0200 Subject: [PATCH 2/2] [roottest] adjust cmake for core tests --- roottest/root/core/.rootrc | 1 - roottest/root/core/CMakeLists.txt | 19 ++++++++----------- roottest/root/core/base64.ref | 2 +- roottest/root/core/execStatusBitsCheck.ref | 2 +- roottest/root/core/lifetime.ref | 2 +- roottest/root/core/recursive/CMakeLists.txt | 11 +++++++---- roottest/root/core/stringView.ref | 2 +- 7 files changed, 19 insertions(+), 20 deletions(-) delete mode 100644 roottest/root/core/.rootrc diff --git a/roottest/root/core/.rootrc b/roottest/root/core/.rootrc deleted file mode 100644 index 6ebe75fd4ec5a..0000000000000 --- a/roottest/root/core/.rootrc +++ /dev/null @@ -1 +0,0 @@ -Rint.History: .root_hist diff --git a/roottest/root/core/CMakeLists.txt b/roottest/root/core/CMakeLists.txt index 72d52d7d194a6..ac6c03e515830 100644 --- a/roottest/root/core/CMakeLists.txt +++ b/roottest/root/core/CMakeLists.txt @@ -16,21 +16,18 @@ ROOTTEST_ADD_TEST(base64 MACRO base64.C OUTREF base64.ref) -ROOTTEST_ADD_TEST(assertHumanReadable +ROOTTEST_ADD_TEST(HumanReadable MACRO assertHumanReadable.cxx+ - OUTREF assertHumanReadable.ref - ) + OUTREF assertHumanReadable.ref) -ROOTTEST_ADD_TEST(assertROOT7244 +ROOTTEST_ADD_TEST(ROOT7244 MACRO assertROOT7244.C - COPY_TO_BUILDDIR subdir_ROOT7244/TheFile.h - ) + COPY_TO_BUILDDIR subdir_ROOT7244/TheFile.h) -ROOTTEST_ADD_TEST(assertROOT8542 - MACRO assertROOT8542.C - ) +ROOTTEST_ADD_TEST(ROOT8542 + MACRO assertROOT8542.C) -ROOTTEST_ADD_TEST(execStatusBitsCheck +ROOTTEST_ADD_TEST(StatusBitsCheck MACRO execStatusBitsCheck.C OUTCNV convert.sh OUTREF execStatusBitsCheck.ref) @@ -39,4 +36,4 @@ add_test(NAME root_exe_exitStatus COMMAND $ "-e invalid" " set_property(TEST root_exe_exitStatus PROPERTY WILL_FAIL True) add_test(NAME root_exe_errorMessage COMMAND $ "-e invalid" "--no_exist") set_property(TEST root_exe_errorMessage PROPERTY - PASS_REGULAR_EXPRESSION "root: unrecognized option '-e invalid'.*--no_exist.*Try 'root --help'") + PASS_REGULAR_EXPRESSION "root: unrecognized option '-e invalid'.*--no_exist.*Try 'root --help'") diff --git a/roottest/root/core/base64.ref b/roottest/root/core/base64.ref index 066bcc2e3fc64..28394f0662329 100644 --- a/roottest/root/core/base64.ref +++ b/roottest/root/core/base64.ref @@ -1,5 +1,5 @@ -Processing roottest/root/core/base64.C... +Processing base64.C... base64: VGhpcyBpcyB0ZXN0IGJpbmFyeQ== base64: coding1 match base64: T3RoZXIgdGVzdCBzdHJpbmc= diff --git a/roottest/root/core/execStatusBitsCheck.ref b/roottest/root/core/execStatusBitsCheck.ref index bf282bffc596d..b7272a8f97a7d 100644 --- a/roottest/root/core/execStatusBitsCheck.ref +++ b/roottest/root/core/execStatusBitsCheck.ref @@ -1,4 +1,4 @@ -Processing /Users/pcanal/root_working/roottest/root/core/execStatusBitsCheck.C... +Processing execStatusBitsCheck.C... First verify verbose output in the case of TStreamerElement Bit 0 declared in TObject as kCanDelete Bit 3 declared in TObject as kMustCleanup diff --git a/roottest/root/core/lifetime.ref b/roottest/root/core/lifetime.ref index cfffcf1c271f7..0a3df1e06b401 100644 --- a/roottest/root/core/lifetime.ref +++ b/roottest/root/core/lifetime.ref @@ -1,2 +1,2 @@ -Processing roottest/root/core/lifetime.C... +Processing lifetime.C... diff --git a/roottest/root/core/recursive/CMakeLists.txt b/roottest/root/core/recursive/CMakeLists.txt index 6d91a615ce855..4e25b18dd1d66 100644 --- a/roottest/root/core/recursive/CMakeLists.txt +++ b/roottest/root/core/recursive/CMakeLists.txt @@ -1,8 +1,11 @@ -ROOTTEST_GENERATE_EXECUTABLE(recursivewarning recursivewarning.cxx LIBRARIES Core) +ROOTTEST_GENERATE_EXECUTABLE(recursivewarning + recursivewarning.cxx + LIBRARIES Core + FIXTURES_SETUP root-core-recursive-recursivewarning-fixture) + ROOTTEST_ADD_TEST(recursivewarning EXEC ./recursivewarning OUTREF test_recursivewarning.ref - DEPENDS ${GENERATE_EXECUTABLE_TEST}) - -configure_file(fakelib.rootmap . COPYONLY) + COPY_TO_BUILDDIR fakelib.rootmap + FIXTURES_REQUIRED root-core-recursive-recursivewarning-fixture) diff --git a/roottest/root/core/stringView.ref b/roottest/root/core/stringView.ref index c63ad548d5020..9e58b5895aaed 100644 --- a/roottest/root/core/stringView.ref +++ b/roottest/root/core/stringView.ref @@ -1,4 +1,4 @@ -Processing roottest/root/core/stringView.C... +Processing stringView.C... asd Comparison with char[4] worked