Improve test case failure/skip states and their output (#4116)
This change addresses item #4116
This changes visible test output
The following changes are proposed:
- Change the test output message when encountering an error exit code.
- Check for skipped tests and mark them as skipped.
The purpose of this change
Currently if a test fails, it's not immediately clear why that is because we give the exit code - and not the output from ctest. That is now fixed and the ctest output is shown which greatly improves the usefulness of the Test Results pane and other places where this output is shown like Code Lens.
Skipped test cases were also not actually marked as skipped, and that is now fixed as well.
Other Notes/Information
Comparison screenshots to show the improvement:
Failed Tests
| Before | After |
|---|---|
Skipped Tests
| Before | After |
|---|---|
Unfortunately this google test example I used doesn't set test source location, but if it did then code lens would be affected as well like in this outdated screenshot from the issue:
@microsoft-github-policy-service agree company="KDAB"
@redstrate This looks great!
If you could please make a CHANGELOG entry, then we can approve and accept this PR! Thanks.
Done!