AutoTest: Provide way to access the original test output

When running tests the original output is processed and not presented
to the user at all. For crashing tests this could mean that output
was not able to get processed completely (e.g. when having XML as
output and relying on well-formed code)
Unhandled output could also lead to incorrect results.
This patch adds another view to the results pane which contains
the complete output of the last test run.

Change-Id: I923496e9c440de4ea68bee55415777ea5c2379c2
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2017-05-05 13:01:06 +02:00
parent e78324dc17
commit c1555b1d7e
13 changed files with 77 additions and 27 deletions

View File

@@ -157,6 +157,8 @@ static void performTestRun(QFutureInterface<TestResultPtr> &futureInterface,
QScopedPointer<TestOutputReader> outputReader;
outputReader.reset(testConfiguration->outputReader(futureInterface, &testProcess));
QTC_ASSERT(outputReader, continue);
TestRunner::connect(outputReader.data(), &TestOutputReader::newOutputAvailable,
TestResultsPane::instance(), &TestResultsPane::addOutput);
if (futureInterface.isCanceled())
break;
@@ -364,7 +366,8 @@ void TestRunner::debugTests()
if (useOutputProcessor) {
TestOutputReader *outputreader = config->outputReader(*futureInterface, 0);
connect(outputreader, &TestOutputReader::newOutputAvailable,
TestResultsPane::instance(), &TestResultsPane::addOutput);
connect(runControl, &ProjectExplorer::RunControl::appendMessageRequested,
this, [this, outputreader]
(ProjectExplorer::RunControl *, const QString &msg, Utils::OutputFormat format) {