This is a bunch of small changes that together enable running tests from
CMake with support for QtTest and viewing results in the tool view.
The changes include:
- Enable listing test cases from tests defined with CMake and QtTest
- Extract sources for each target from cmake server
- Use target sources to look for QtTest declarations in them
- Fix the search for QtTest declarations, so that it works without access to the main() function body
- When running tests, parse the output and report results
- Exctract output directly from the OutputModel, which is long-lived, and not from the shorter-lived OutputJob. The previous method would lose some lines of output.
- Wait for asynchronous output signals from OutputModel, which again prevents losing some lines of test program output.
- A new unit test that checks the cases parsed from source code, using the existing testing project unit_tests_kde.
With these changes, the test suites and individual test cases appear in the
Unit Tests tool view: