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

@@ -383,16 +383,17 @@ bool GTestVisitor::visit(CPlusPlus::FunctionDefinitionAST *ast)
m_document->translationUnit()->getTokenStartPosition(token, &line, &column);
TestCodeLocationAndType locationAndType;
locationAndType.m_name = disabled ? testName.mid(9) : testName;
locationAndType.m_name = testName;
locationAndType.m_line = line;
locationAndType.m_column = column - 1;
locationAndType.m_type = TestTreeItem::TestFunctionOrSet;
locationAndType.m_state = (disabled || disabledCase) ? GoogleTestTreeItem::Disabled
: GoogleTestTreeItem::Enabled;
locationAndType.m_state = disabled ? GoogleTestTreeItem::Disabled
: GoogleTestTreeItem::Enabled;
GTestCaseSpec spec;
spec.testCaseName = disabledCase ? testCaseName.mid(9) : testCaseName;
spec.testCaseName = testCaseName;
spec.parameterized = TestUtils::isGTestParameterized(prettyName);
spec.typed = TestUtils::isGTestTyped(prettyName);
spec.disabled = disabledCase;
m_gtestFunctions[spec].append(locationAndType);
}