I am using gtest to write unit tests for my application. I also have ctest that runs all executables added by add_test CMake command. Is it possible to pass gtest variables through ctest when test execution starts?
I would like to for example sometimes filter out tests with --gtest_filter flag but I don't know how or if this is even possible through ctest? I have tried the following ways:
ctest --gtest_filter=AppTest.*
ctest --test-arguments="--gtest_filter=AppTest.*"
But both still run all tests instead the filtered ones.
Thanks!