AutoTest: Introduce ITestConfiguration

Preparation for an additional simpler test configuration
which needs to have the same common base.

Change-Id: I1800ed5d7301f1aea99eba6ef588a204697bd569
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2020-10-13 11:37:37 +02:00
parent 55298cc211
commit 239a59c596
34 changed files with 373 additions and 310 deletions

View File

@@ -162,33 +162,35 @@ bool TestTreeModel::hasTests() const
return false;
}
QList<TestConfiguration *> TestTreeModel::getAllTestCases() const
QList<ITestConfiguration *> TestTreeModel::getAllTestCases() const
{
QList<TestConfiguration *> result;
QList<ITestConfiguration *> result;
for (Utils::TreeItem *frameworkRoot : *rootItem())
result.append(static_cast<ITestTreeItem *>(frameworkRoot)->getAllTestConfigurations());
return result;
}
QList<TestConfiguration *> TestTreeModel::getSelectedTests() const
QList<ITestConfiguration *> TestTreeModel::getSelectedTests() const
{
QList<TestConfiguration *> result;
QList<ITestConfiguration *> result;
for (Utils::TreeItem *frameworkRoot : *rootItem())
result.append(static_cast<ITestTreeItem *>(frameworkRoot)->getSelectedTestConfigurations());
return result;
}
QList<TestConfiguration *> TestTreeModel::getFailedTests() const
QList<ITestConfiguration *> TestTreeModel::getFailedTests() const
{
QList<TestConfiguration *> result;
QList<ITestConfiguration *> result;
// FIXME limit to frameworks
for (Utils::TreeItem *frameworkRoot : *rootItem())
result.append(static_cast<ITestTreeItem *>(frameworkRoot)->getFailedTestConfigurations());
return result;
}
QList<TestConfiguration *> TestTreeModel::getTestsForFile(const Utils::FilePath &fileName) const
QList<ITestConfiguration *> TestTreeModel::getTestsForFile(const Utils::FilePath &fileName) const
{
QList<TestConfiguration *> result;
QList<ITestConfiguration *> result;
// FIXME limit to frameworks
for (Utils::TreeItem *frameworkRoot : *rootItem())
result.append(static_cast<TestTreeItem *>(frameworkRoot)->getTestConfigurationsForFile(fileName));
return result;