Hi,
Within my team at work, we use the GoogleTest framework to check if everything goes as expected for our C and C++ libraries. We would like to use those tests in order to evaluate the coverage of our code and to check if leaks occur during execution.
However we have some cases where the amount of data tested is important. Being in a computer vision environment we often need to test huge algorithms on several images. With valgrind as a topping executer, it quickly become a very long task to handle. But using some Google Test framework utilities like:
We can easily filter out some data. The idea being having 2 steps:
- Checking tests validity (with EXPECT_* and ASSERT_*)
- Checking leaks (without EXPECT_* and ASSERT_*)
Although it is possible to use a recompilation to do that (using a compilation definition we can redefine those macros), I think it is better in a Continuous Integration purpose to avoid having to recompile everything and a runtime option to disable those macros would help (at least in my case).
I don't know if this is something that could be useful for other people or if an other solution already exist but I haven't found anything that could do what I want at runtime.
Any thoughts on this really appreciated.