forked from qt-creator/qt-creator
AutoTest: Fix running Quick Tests with special functions
If special functions (init, initTestCase, cleanup, cleanupTestCase) are present for a Quick Test they must get ignored when trying to run a single test as they cannot get explicitly addressed. Task-number: QTCREATORBUG-19311 Change-Id: Ie91928271928cf581bfef0b5e3463e027af985fd Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -123,8 +123,12 @@ TestConfiguration *QuickTestTreeItem::testConfiguration() const
|
|||||||
switch (type()) {
|
switch (type()) {
|
||||||
case TestCase: {
|
case TestCase: {
|
||||||
QStringList testFunctions;
|
QStringList testFunctions;
|
||||||
for (int row = 0, count = childCount(); row < count; ++row)
|
for (int row = 0, count = childCount(); row < count; ++row) {
|
||||||
testFunctions << name() + "::" + childItem(row)->name();
|
const TestTreeItem *child = childItem(row);
|
||||||
|
if (child->type() == TestTreeItem::TestSpecialFunction)
|
||||||
|
continue;
|
||||||
|
testFunctions << name() + "::" + child->name();
|
||||||
|
}
|
||||||
config = new QuickTestConfiguration;
|
config = new QuickTestConfiguration;
|
||||||
config->setTestCases(testFunctions);
|
config->setTestCases(testFunctions);
|
||||||
config->setProjectFile(proFile());
|
config->setProjectFile(proFile());
|
||||||
|
Reference in New Issue
Block a user