Skip to content

Conversation

@gkoulin
Copy link
Contributor

@gkoulin gkoulin commented Oct 1, 2024

No description provided.

@nmwsharp
Copy link
Owner

nmwsharp commented Apr 2, 2025

Hi! Thanks for submitting this. What is the SPLIT_TESTS variable? Is that some standard CMake thing?

@gkoulin
Copy link
Contributor Author

gkoulin commented Apr 29, 2025

Hi,

GTest provides a macro gtest_discover_tests which creates individual CTest per GTest test (declared by TEST C++ macro) embedded into a test binary. This can be useful when running tests locally to more easily inspect granular results, especially integrating with UI. When developing I found it useful to split tests up in this way.

However, there is a downside. When running all tests, this approach is slower, since each test executes the test binary with the filter to select just a single test. Therefore, it is not really appropriate for CI, where the goal is to run all tests as quickly as possible.

Hence, I introduced SPLIT_TESTS variable to handle both of these cases. Perhaps it should be an option with a help message.

I found this useful locally, so thought I would share it. Feel free to discard this PR.

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

Successfully merging this pull request may close these issues.

2 participants