-
Notifications
You must be signed in to change notification settings - Fork 3
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
CMake: fortuno_discover_tests
and fortuno_add_tests
function
#8
Comments
Just two remarks:
|
Indeed, this would only be for basic formats that follow a predictable pattern like
Yes, because the IDEs support running individual tests/labels, where you can add the debugger.
Good point, I'm not sure how gtest and catch do it in this case. They do have test fixtures, but I don't think they take advantage of this in their design when they are run through ctest. I think there could be some conflict on how to report and measure the test result for individual tests. Worth raising upstream for some advice. The only design I can think of is to use ctest |
Hm, that sounds rather complicated, I am not even sure, whether a new process can be attached to an already running MPI-framework... So, if people discover the tests and run them one-by-one as separate processes, they would have to live with the penalty caused by the repeated MPI-setups... |
OK. I had a quick look on the Catch and the GTest integration with CMake. Both test systems seems to prefer the discover-method, which uses the compiled test binary to extract the list of tests. I think, we should first concentrate on this as well as this is the only really robust and reliable way to get the list of tests. |
This part should only focus on registering the tests, and there are two interfaces to implement:
fortuno_add_tests
: Add tests by scanning the source code. This makes the tests and list of tests available at configure time. Could use some regex magic to parse thisfortuno_discover_tests
: Discover the tests dynamically by listing the tests from the test-suite executableAt this stage, we will not worry about generating the test-suite app itself, and instead just automatically register the tests
From Catch2 and gtest implementation, we should mirror them as much as possible, so the synopsis should be like:
(
DL_PATHS
is low priority, it's just for windows to adddll
directory toPATH
)Reference:
The text was updated successfully, but these errors were encountered: