AutoTest: Add some gtest related settings

This patch enables execution of disabled tests, repetition of
test runs and shuffling of test sets.

Change-Id: I3668afde5766d18acdf1afb7edd913655b13a76c
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
This commit is contained in:
Christian Stenger
2016-02-23 17:40:10 +01:00
parent a4b747307e
commit ba61f2946d
15 changed files with 224 additions and 26 deletions

View File

@@ -388,6 +388,8 @@ GoogleTestTreeItem *GoogleTestTreeItem::createTestItem(const TestParseResult &re
item->setState(Parameterized);
if (result.typed)
item->setState(Typed);
if (result.disabled)
item->setState(Disabled);
foreach (const TestCodeLocationAndType &location, result.dataTagsOrTestSets.first())
item->appendChild(createTestSetItem(result, location));
return item;
@@ -408,10 +410,14 @@ GoogleTestTreeItem *GoogleTestTreeItem::createTestSetItem(const TestParseResult
QVariant GoogleTestTreeItem::data(int column, int role) const
{
switch (role) {
case Qt::DisplayRole:
if (type() == TestCase)
return QVariant(name() + nameSuffix());
break;
case Qt::DisplayRole: {
if (type() == TestTreeItem::Root)
return TestTreeItem::data(column, role);
const QString &displayName = (m_state & GoogleTestTreeItem::Disabled)
? name().mid(9) : name();
return QVariant(displayName + nameSuffix());
}
case StateRole:
return (int)m_state;
default: