-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add DISCOVERY_MODE to catch_discover_tests #2493
Comments
hkaelber
pushed a commit
to hkaelber/Catch2
that referenced
this issue
Apr 11, 2023
Introducing a new DISCOVERY_MODE mode option, which provides greater control over when catch_discover_tests perforsm test discovery. It has two supported modes: * POST_BUILD: The default behavior, which adds a POST_BUILD command to perform test discovery after the test has been built as was always done so far. * PRE_TEST: New mode, which delays test discovery until test execution. The generated include file generates the appropriate CTest files at runtime and regenerates the CTest files when the executable is updated. This mode can be used in build-environments that don't allow for executing the linked binaries at build-time (like in a cross-compilation environment). DISCOVERY_MODE can be controlled in two ways: 1. Setting the DISCOVERY_MODE when calling catch_discover_tests. 2. Setting the global CMAKE_CATCH_DISCOVER_TESTS_DISCOVERY_MODE prior to calling gtest_discover_tests. Closes catchorg#2493
hkaelber
pushed a commit
to hkaelber/Catch2
that referenced
this issue
Apr 17, 2023
Introducing a new DISCOVERY_MODE mode option, which provides greater control over when catch_discover_tests perforsm test discovery. It has two supported modes: * POST_BUILD: The default behavior, which adds a POST_BUILD command to perform test discovery after the test has been built as was always done so far. * PRE_TEST: New mode, which delays test discovery until test execution. The generated include file generates the appropriate CTest files at runtime and regenerates the CTest files when the executable is updated. This mode can be used in build-environments that don't allow for executing the linked binaries at build-time (like in a cross-compilation environment). DISCOVERY_MODE can be controlled in two ways: 1. Setting the DISCOVERY_MODE when calling catch_discover_tests. 2. Setting the global CMAKE_CATCH_DISCOVER_TESTS_DISCOVERY_MODE prior to calling gtest_discover_tests. Closes catchorg#2493
horenmar
pushed a commit
that referenced
this issue
Apr 19, 2023
Introducing a new DISCOVERY_MODE mode option, which provides greater control over when catch_discover_tests perforsm test discovery. It has two supported modes: * POST_BUILD: The default behavior, which adds a POST_BUILD command to perform test discovery after the test has been built as was always done so far. * PRE_TEST: New mode, which delays test discovery until test execution. The generated include file generates the appropriate CTest files at runtime and regenerates the CTest files when the executable is updated. This mode can be used in build-environments that don't allow for executing the linked binaries at build-time (like in a cross-compilation environment). DISCOVERY_MODE can be controlled in two ways: 1. Setting the DISCOVERY_MODE when calling catch_discover_tests. 2. Setting the global CMAKE_CATCH_DISCOVER_TESTS_DISCOVERY_MODE prior to calling gtest_discover_tests. Closes #2493
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
catch_discover_tests is modelled after CMake's gtest_discover_tests, but it's not up to date.
Since CMake 3.18 gtest_discover_tests has supported a DISCOVERY_MODE option, which when set to PRE_TEST allows for the test discovery to be delayed until just prior to test execution. This is useful when cross-compiling, since the build machine may be unable to run the test executable.
Adding DISCOVERY_MODE to catch_discover_tests would be equally useful.
The text was updated successfully, but these errors were encountered: