Closed wrgrant closed 3 years ago
Unfortunately not - VS provides the executable candidates to the test adapters, and they decide whether a particular executable is indeed to be processed because it contains tests. However, the adapters have no control whatsoever when it comes to selecting the executables...
If I remember correctly, GTA should pick up all executables (not only the changed ones) if you select "Run all tests", but that probably also doesn't help too much, I guess.
Btw, sorry for the late answer...
Context: I'm working on a project that has ~170 projects in the visual studio solution.
So about 65 projects with matching 'test' projects that generate the usual gtest executables.
Upon restart of visual studio, all tests are cleared out of Test Explorer. When I to a Build > Build Solution, VS properly says everything is up to date, as no source code was changed. But for some reason, tests from only one test executable are discovered.
I would really like to be able to run my whole test suite without going into the main.cpp for each test project and doing a Ctrl+S to bump the time stamp and recompile.
Also, I have enabled verbose output mode and can see that GTA is only scanning the single test executable for the tests that it does find. Even though it is sitting in the same directory as the many other test executables.
From the file timestamps, the one test executable that is found does indeed have a modified date showing that it is updated during the build stage, so clearly this is why the tests are being parsed from it.
But back to my question in the issue title - is this possible?