forked from qt-creator/qt-creator
AutoTest: Fix gathering failed Qt based tests
Omit special and test data functions while collecting as these cannot be addressed at all. Change-Id: I3d79192cd07b4e7e2e76f04dfad36ef033593e71 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -226,7 +226,7 @@ static void collectFailedTestInfo(TestTreeItem *item, QList<ITestConfiguration *
|
||||
QTC_ASSERT(item->type() == TestTreeItem::TestCase, return);
|
||||
QStringList testCases;
|
||||
item->forFirstLevelChildren([&testCases](ITestTreeItem *func) {
|
||||
if (func->data(0, FailedRole).toBool()) {
|
||||
if (func->type() == TestTreeItem::TestFunction && func->data(0, FailedRole).toBool()) {
|
||||
testCases << func->name();
|
||||
} else {
|
||||
func->forFirstLevelChildren([&testCases, func](ITestTreeItem *dataTag) {
|
||||
|
@@ -271,7 +271,7 @@ QList<ITestConfiguration *> QuickTestTreeItem::getSelectedTestConfigurations() c
|
||||
QList<ITestConfiguration *> QuickTestTreeItem::getFailedTestConfigurations() const
|
||||
{
|
||||
return testConfigurationsFor(this, [](TestTreeItem *it) {
|
||||
return it->data(0, FailedRole).toBool();
|
||||
return it->data(0, FailedRole).toBool() && it->type() == TestTreeItem::TestFunction;
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user