diff options
author | Christian Stenger <christian.stenger@qt.io> | 2017-11-20 09:28:19 +0100 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2017-11-20 14:45:10 +0000 |
commit | 466fb7ea530b67ded1af2895b22e782afd809c74 (patch) | |
tree | dfbcc9ddc537065582feb797b57867f6f3559ddb /src | |
parent | fae4f2c9b5da6c58313702a7b7ac6c851ef5a91e (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/autotest/quick/quicktesttreeitem.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/autotest/quick/quicktesttreeitem.cpp b/src/plugins/autotest/quick/quicktesttreeitem.cpp index 953f31e661..29f6aa4a7c 100644 --- a/src/plugins/autotest/quick/quicktesttreeitem.cpp +++ b/src/plugins/autotest/quick/quicktesttreeitem.cpp @@ -123,8 +123,12 @@ TestConfiguration *QuickTestTreeItem::testConfiguration() const switch (type()) { case TestCase: { QStringList testFunctions; - for (int row = 0, count = childCount(); row < count; ++row) - testFunctions << name() + "::" + childItem(row)->name(); + for (int row = 0, count = childCount(); row < count; ++row) { + const TestTreeItem *child = childItem(row); + if (child->type() == TestTreeItem::TestSpecialFunction) + continue; + testFunctions << name() + "::" + child->name(); + } config = new QuickTestConfiguration; config->setTestCases(testFunctions); config->setProjectFile(proFile()); |