AutoTest: Support gathering failed tests

Mark test tree items as failed for the last run
to be able to re-run them in an easier way.

Change-Id: I7ea3dcd16e5a02797d41f13e02b2fa95b857cf5e
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2020-09-11 14:30:15 +02:00
parent b4987f8fc9
commit 5f22126a79
16 changed files with 276 additions and 4 deletions

View File

@@ -102,6 +102,8 @@ QVariant TestTreeItem::data(int /*column*/, int role) const
return m_type;
case EnabledRole:
return true;
case FailedRole:
return m_failed;
}
return QVariant();
}
@@ -112,6 +114,8 @@ bool TestTreeItem::setData(int /*column*/, const QVariant &data, int role)
Qt::CheckState old = m_checked;
m_checked = Qt::CheckState(data.toInt());
return m_checked != old;
} else if (role == FailedRole) {
m_failed = data.toBool();
}
return false;
}
@@ -262,6 +266,11 @@ QList<TestConfiguration *> TestTreeItem::getSelectedTestConfigurations() const
return QList<TestConfiguration *>();
}
QList<TestConfiguration *> TestTreeItem::getFailedTestConfigurations() const
{
return QList<TestConfiguration *>();
}
QList<TestConfiguration *> TestTreeItem::getTestConfigurationsForFile(const Utils::FilePath &) const
{
return QList<TestConfiguration *>();
@@ -333,6 +342,7 @@ void TestTreeItem::copyBasicDataFrom(const TestTreeItem *other)
m_filePath = other->m_filePath;
m_type = other->m_type;
m_checked = other->m_checked;
m_failed = other->m_failed;
m_line = other->m_line;
m_column = other->m_column;
m_proFile = other->m_proFile;