From 2501c02e2bf0f65f3be89fe6b4c11d8b4d193cc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=BCseyin=20Kutsi=20Balc=C4=B1?= Date: Wed, 5 Aug 2026 07:59:53 +0000 Subject: [PATCH] [tutorials] Remove dead test-dependency variables Four `-depends` variables in tutorials/CMakeLists.txt are never read by CMake, so the test ordering they describe is not applied. The variables are consulted only as `${${tname}-depends}`, where `tname` is the tutorial path with its extension stripped and `/` replaced by `-`. A variable therefore has an effect only if a tutorial file resolves to its name. - `benchmarks-depends`: the file is `legacy/benchmarks.C`, so its tname is `legacy-benchmarks`. It is also listed in `extra_veto`, so no test is generated for it at all. Two of its entries are stale on top of that: `tutorial-io-tree-tree120_ntuple.C` carries a stray `.C`, and `tutorial-io-tree-spider` names a tutorial that no longer exists. - `pyroot-benchmarks-depends`: `tutorials/pyroot/` was dissolved when the pyroot tutorials were moved, and no `pyroot/benchmarks.py` remains. - `analysis-unfold-testUnfold7d-depends`: the unfold series stops at `testUnfold7c.C`; there is no `testUnfold7d.C`. The parallel `testUnfold5d` variable is kept, because that tutorial does exist. - `machine_learning-TMVA_SOFIE_RDataFrame-py-depends`: `tname` never ends in `-py`, because the `-py` suffix is appended to `tutorial_name` and not to `tname`, and no tutorial file is named `*-py.py`. The ordering it asks for is already in place: the Python tutorial reads `machine_learning-TMVA_SOFIE_RDataFrame-depends`, which is set unconditionally a few hundred lines earlier and already names the producer with its `-py` suffix. Removing the unread variable does not change the dependency the test ends up with. No test loses a dependency it was actually getting. --- tutorials/CMakeLists.txt | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/tutorials/CMakeLists.txt b/tutorials/CMakeLists.txt index 85d898bf47677..497b276964e05 100644 --- a/tutorials/CMakeLists.txt +++ b/tutorials/CMakeLists.txt @@ -589,7 +589,6 @@ set(returncode_1 math/fit/fit2a.C set(analysis-unfold-testUnfold5d-depends tutorial-analysis-unfold-testUnfold5c) set(analysis-unfold-testUnfold5c-depends tutorial-analysis-unfold-testUnfold5b) set(analysis-unfold-testUnfold5b-depends tutorial-analysis-unfold-testUnfold5a) -set(analysis-unfold-testUnfold7d-depends tutorial-analysis-unfold-testUnfold7c) set(analysis-unfold-testUnfold7c-depends tutorial-analysis-unfold-testUnfold7b) set(analysis-unfold-testUnfold7b-depends tutorial-analysis-unfold-testUnfold7a) set(io-xml-xmlmodifyfile-depends tutorial-io-xml-xmlnewfile) @@ -605,17 +604,6 @@ set(math-foam-foam_demopers-depends tutorial-math-foam-foam_demo) set(io-tree-tree502_staff-depends tutorial-io-tree-tree500_cernbuild) set(io-tree-tree501_cernstaff-depends tutorial-io-tree-tree500_cernbuild) set(hist-hist006_TH1_bar_charts-depends tutorial-io-tree-tree500_cernbuild) -set(benchmarks-depends tutorial-hsimple - tutorial-math-fit-fit1 - tutorial-math-fit-myfit - tutorial-hist-hist015_TH1_read_and_draw - tutorial-hist-hist056_TPolyMarker_contour - tutorial-legacy-g3d-na49view - tutorial-io-tree-tree120_ntuple.C - tutorial-io-tree-spider - tutorial-io-hadd - tutorial-io-loopdir - tutorial-io-copyFiles) set(legacy-g3d-na49view-depends tutorial-legacy-g3d-geometry) set(io-tree-mt_readNtuplesFillHistosAndFit-depends tutorial-io-tree-mt_fillNtuples) set(io-tree-mp_readNtuplesFillHistosAndFit-depends tutorial-io-tree-mp_fillNtuples) @@ -849,10 +837,6 @@ if(pyroot) list(APPEND pyveto ${tmva_veto_py}) endif() - if (ROOT_TORCH_FOUND AND ROOT_ONNX_FOUND) - set (machine_learning-TMVA_SOFIE_RDataFrame-py-depends tutorial-machine_learning-TMVA_SOFIE_PyTorch_HiggsModel) - endif() - if(NOT tmva-pymva) file(GLOB tmva_veto_py RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} machine_learning/pytorch/*.py) list(APPEND pyveto ${tmva_veto_py}) @@ -878,11 +862,6 @@ if(pyroot) #---Python tutorials dependencies-------------------------------------- set(io-tree-ntuple1-depends tutorial-hsimple-py) set(hist-hist015_TH1_read_and_draw-depends tutorial-hsimple-py) - set(pyroot-benchmarks-depends tutorial-hsimple-py - tutorial-math-fit-fit1-py - tutorial-legacy-g3d-na49view-py - tutorial-hist-hist015_TH1_read_and_draw-py - tutorial-io-tree-ntuple1-py) set(hist-hist015_TH1_read_and_draw_uhi-depends tutorial-hsimple-py) set(math-fit-fit1-depends tutorial-hist-hist001_TH1_fillrandom-py) set(legacy-g3d-na49view-depends tutorial-legacy-g3d-geometry-py)