Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++] Provide option to opt out of installing tests #44993

Open
h-vetinari opened this issue Dec 10, 2024 · 3 comments
Open

[C++] Provide option to opt out of installing tests #44993

h-vetinari opened this issue Dec 10, 2024 · 3 comments

Comments

@h-vetinari
Copy link
Contributor

Describe the enhancement requested

Since conda-forge/arrow-cpp-feedstock#1058, we have unintentionally been shipping the following in libarrow-all

lib/cmake/ArrowFlightTesting/ArrowFlightTestingConfig.cmake
lib/cmake/ArrowFlightTesting/ArrowFlightTestingConfigVersion.cmake
lib/cmake/ArrowFlightTesting/ArrowFlightTestingTargets-release.cmake
lib/cmake/ArrowFlightTesting/ArrowFlightTestingTargets.cmake
lib/cmake/ArrowTesting/ArrowTestingConfig.cmake
lib/cmake/ArrowTesting/ArrowTestingConfigVersion.cmake
lib/cmake/ArrowTesting/ArrowTestingTargets-release.cmake
lib/cmake/ArrowTesting/ArrowTestingTargets.cmake
lib/cmake/ArrowTesting/FindGTestAlt.cmake
lib/libarrow_flight_testing.so
lib/libarrow_flight_testing.so.1801
lib/libarrow_flight_testing.so.1801.0.0
lib/libarrow_testing.so
lib/libarrow_testing.so.1801
lib/libarrow_testing.so.1801.0.0
lib/pkgconfig/arrow-flight-testing.pc
lib/pkgconfig/arrow-testing.pc

I didn't check this more closely because my experience with other CMake projects is that tests don't get installed by default (but need a specific opt-in). It would be nice to have an ARROW_INSTALL_TESTS to go along with ARROW_BUILD_TESTS which controls whether these files get installed.

I care less about the choice of default for ARROW_INSTALL_TESTS (or whatever it ends up being called), though I think it should be set to False.

Component(s)

C++, Packaging

@kou kou changed the title ENH: Provide option to opt out of installing tests [C++] Provide option to opt out of installing tests Dec 10, 2024
@kou
Copy link
Member

kou commented Dec 10, 2024

libarrow_testing and libarrow_flight_testing are not tests. They are utility libraries to write tests.

It's better that conda creates separated subpackages for them. For example, libarrow-testing for libarrow_testing and libarrow-flight-testing for libarrow_flight_testing.

@h-vetinari
Copy link
Contributor Author

libarrow_testing and libarrow_flight_testing are not tests. They are utility libraries to write tests.

OK, they're test infrastructure.

It's better that conda creates separated subpackages for them.

I'm not interested in shipping these things unless a very concrete use-case comes up, otherwise we're just wasting everyone's bandwidth and storage for nothing.

I only want to test the library, and then not install the tests and any test-only infrastructure. I can do this manually, but that's fragile if arrow ever adds new stuff that ends up getting installed through ARROW_BUILD_TESTS. It should not be controversial to separate building tests (+ whatever else comes along!) from installing them?

@xhochy
Copy link
Member

xhochy commented Dec 13, 2024

They are utility libraries to write tests.

This means though that:

  1. Other packages could use them.
  2. They should be always built, not only when testing is turned on.

Right?

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

No branches or pull requests

3 participants