Skip to content

BUILD_TESTING OFF Does not disable all tests. #143

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

Open
Tetragramm opened this issue Feb 11, 2025 · 3 comments
Open

BUILD_TESTING OFF Does not disable all tests. #143

Tetragramm opened this issue Feb 11, 2025 · 3 comments

Comments

@Tetragramm
Copy link

Specifically, the python tests, such as
metavision-hal-python-bindings-test and pytests_core as two examples.

Should be a simple matter of adding the same if-condition to these tests, but there are at least 6, possibly more.

@lbristiel-psee
Copy link
Contributor

Hello @Tetragramm

In the OpenEB repository, the BUILD_TESTING option controls whether the test suite is compiled or not, but the tests themselves are not executed during compilation, regardless of whether BUILD_TESTING is set to ON or OFF.

To actually run the tests, you need to manually execute the following command "ctest -C Release" as documented here: https://docs.prophesee.ai/stable/installation/linux_openeb.html#running-tests

Could you provide more details about the issue you're encountering?

  • What command are you running?
  • What behavior do you expect?
  • What actually happens? (How do you observe that unexpected tests are being launched?)

This will help us better understand and diagnose the problem.

Thanks,
Laurent for Prophesee Support

@Tetragramm
Copy link
Author

Tetragramm commented Feb 19, 2025

OpenEB is integrated as a CMake subproject in my project.
BUILD_TESTING is set to OFF
COMPILE_PYTHON3_BINDINGS is set to ON

A combination of VSCode and CMake gathers up all the tests created (both mine and those from OpenEB) and places them into the list of unit tests, where they fail.

Image

Here is one of the places tests are being incorrectly generated:

add_subdirectory(tests)

Here is a place it is being done correctly:
# Tests
if (BUILD_TESTING)
add_subdirectory(tests)
endif (BUILD_TESTING)

@lbristiel-psee
Copy link
Contributor

Got it, thanks for the detailed feedback!
We will incorporate the BUILD_TESTING changes in the next release of SDK/OpenEB.

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

No branches or pull requests

2 participants