Skip to content

Conversation

@dpiparo
Copy link
Member

@dpiparo dpiparo commented Dec 14, 2025

Adapt the tests in order to make them run properly with minimal builds or disable them if they do not make sense for that configuration.

Fixes #20315

@dpiparo
Copy link
Member Author

dpiparo commented Dec 14, 2025

We'll see the tests, however the formatting errors reflect the original formatting and might not be really worth fixing (at the cost of changing the formatting of stable tests)

@ferdymercury
Copy link
Collaborator

A bit related: maybe we should also add a cmake error if minimal=ON but X11/asimage=ON, see https://root-forum.cern.ch/t/cant-built-minimal-root-6-38-00-with-x11-and-asimage/64532

@github-actions
Copy link

github-actions bot commented Dec 14, 2025

Test Results

    21 files      21 suites   3d 17h 0m 0s ⏱️
 3 788 tests  3 788 ✅ 0 💤 0 ❌
77 599 runs  77 599 ✅ 0 💤 0 ❌

Results for commit 94c0e70.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@guitargeek guitargeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the initiative! I would just suggest to not introduce a public R__IS_MINIMAL macro at this point.

" TH1DModel"
#endif
" TH1Editor TH1F TH1I TH1L TH1S";
#ifndef R__IS_MINIMAL
Copy link
Contributor

@guitargeek guitargeek Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#ifndef R__IS_MINIMAL
#if not defined(ROOT_IS_MINIMAL)

I would prefer to not add a ROOT runtime preprocessor macro R__IS_MINIMAL that is also visible to the user if there is no strong reason for it. Because then we need to keep it in principle forever for backwards compatibility, locking ourselves in without a strong reason. Instead, one can add a

if (minimal)
    target_compile_definitions(TTabComTests PRIVATE ROOT_IS_MINIMAL)
endif()

to the CMakeLists.txt. The runtime R__ flags only need to be defined if we need to do these conditionals also in the header files included by the users, but here it's just for a test.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good suggestion. I stopped the builds and will change that part of the PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just suggest to not introduce a public R__IS_MINIMAL macro at this point.

I disagree. The fact that the test are failing under the minimal build is only a secondary symptoms. The real issue is that the tests were failing because a feature they depend on was turned off and they were not reacting properly to that turning off. The problem would still have been there if the users explicitly disable 'just' those feature.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand how the R__IS_MINIMAL macro would sustainably address the issue you describe.

If it's useful for the user to check if ROOT has a certain feature, we should introduce R__HAS_FEATURE macros like we always did.

The R__IS_MINIMAL would be mute, because one can toggle any an feature on top of a minimal build. Why would you use it then?

Copy link
Contributor

@guitargeek guitargeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, very good! I see you just disable the TTabComTests test now for minimal=ON. That's indeed even simpler than making the test conditional on minimal=ON with preprocessor macros.

@dpiparo
Copy link
Member Author

dpiparo commented Dec 15, 2025

Thanks for the advice!

@dpiparo dpiparo merged commit b3a4713 into root-project:master Dec 15, 2025
28 of 29 checks passed
@dpiparo dpiparo deleted the minimal_tests branch December 15, 2025 13:11
# For the list of contributors see $ROOTSYS/README/CREDITS.

ROOT_ADD_GTEST(TTabComTests TTabComTests.cxx LIBRARIES Rint)
if(NOT minimal)
Copy link
Member

@pcanal pcanal Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that really the best test? What 'feature(s)' is missing that make the test not working?

@@ -89,4 +89,9 @@ ROOTTEST_ADD_TEST(hello_ROOT_C
OUTREF hello_ROOT_C_${libsuf}.ref
FIXTURES_REQUIRED root-meta-hello_ROOT-fixture)

if(NOT minimal)
Copy link
Member

@pcanal pcanal Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that really the best test? What 'feature(s)' is missing that make the test not working?

@@ -440,6 +423,12 @@ else()
list(APPEND root7_veto io/ntuple/ntpl011_global_temperatures.C)
endif()

#---These do not run with minimal
if(minimal)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that really the best test? What 'feature' is missing that make the test not working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some test fails with a minimal build

4 participants