conan-io / conan

Conan - The open-source C and C++ package manager
https://conan.io
MIT License
8.31k stars 986 forks source link

[question] Question about test_requires when tools.build:skip_test=True #17147

Closed andersonjd closed 1 month ago

andersonjd commented 1 month ago

What is your question?

If I run the following command:

conan install . --build=missing -c tools.build:skip_test=True

Conan will resolve and build all test_requires for the package dependencies that are missing, even though testing will not be built or performed according to the skip_test=True configuration.

According to the docs here: test-requires, it seems like this is the intended behavior. Can this be changed?

If I have set the skip_test=True configuration I would like to avoid an fetching / building of test_requires all together.

Have you read the CONTRIBUTING guide?

AbrilRBS commented 1 month ago

Hi @andersonjd thanks for your request

We're in the progress of implementing a similar feature, where a Conf can control the expansion of test_requires, see https://github.com/conan-io/conan/pull/17117 for the discussion. We might change how we approach it, but the idea is to release it for the next Conan 2.9 release :)

andersonjd commented 1 month ago

That's perfect, thanks!