AutoTest: Fix handling exceptions while environment setup

If setting up the environment for gtest fails due to an exception
we might end up having no reportable result but we get a return
code of 1 for the test application.
Inform the results pane instead of just ignoring the return code
and explicitly send a fatal result for this.

Task-number: QTCREATORBUG-20280
Change-Id: I05e522764d6302c5b0760c4bc10e01a2248a4494
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2018-04-16 09:45:01 +02:00
parent a7cda9a54b
commit 54f024dba4
3 changed files with 17 additions and 4 deletions

View File

@@ -74,6 +74,14 @@ void TestOutputReader::reportCrash()
m_futureInterface.reportResult(result);
}
void TestOutputReader::createAndReportResult(const QString &message, Result::Type type)
{
TestResultPtr result = createDefaultResult();
result->setDescription(message);
result->setResult(type);
reportResult(result);
}
void TestOutputReader::reportResult(const TestResultPtr &result)
{
m_futureInterface.reportResult(result);