forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user