If a user runs a single test, and that test requires a fixture, the fixture runs correctly. CTest ensures that. However, the extension cannot update the fixture in the Test view since it was not included in the run request. Try to find a way to update fixtures.
With #13, CTest Lab runs the actual test executables. This prevents some CTest functionality from working, like test fixtures, required files, etc. Change the test runner so it uses CTest.
This seems a good method to read the test results. The run tests command can force this output, then read the output to set the tests' status in the VS Code UI. Here is an example file with forced test failure, disabled, and skipped results. After you download the file, change the extension from txt to xml.
Some tests are not available until the user builds them. This happens, for example, with Catch2's catch_discover_tests() command. In these cases, the test name returned by CTest is foo_NOT_BUILT_<hash>. I can detect these cases and exclude them from discovery.
Using the extension installed from the marketplace, it doesn't seem to activate. The test view doesn't appear in the UI. The output channel is not present. And the CTest command is not in the palette. I introduce this bug in v0.3.0. The extension activates when I debug it though.
I think this might be the best way to support running tests by label. I can't think of another way to get the label from the test view filter to the extension to control the --labels-regex command option.
When the user runs tests, there is no immediate feedback except the spinning icons in the test view. The output channel pops up at the end of the run with the output. Activate the channel before executing CTest so users can get immediate test feedback.
Would it be possible to support older ctest installs that don't have --output-junit support? A simple Yes/No based on the ctest return status would be sufficient for my purposes, but bonus points if you can parse the --log-output format.
This function is longer than it should be. Refactor it into separate functions. At first glance, it seems that each .then or .catch block can be a function.
If CTest skips a test, returning a status of "not run", then set that test's description in the test view to "(not run)". Be sure to clear that description if a subsequent test run does run the test.
How can I ask VS Code to evaluate the variable? I haven't found anything in the extension API. I did find the vscode-variables package, but I couldn't get it to work.