diff options
author | Christian Stenger <christian.stenger@qt.io> | 2020-10-19 13:56:19 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2020-11-16 08:10:31 +0000 |
commit | 73613d854932de2d36f2556dfe74cae717f15197 (patch) | |
tree | 9010a545a52ee8aff7ee38ef0263fe08b2c4f43d /src/plugins/autotest/testcodeparser.cpp | |
parent | e95041c0548c75dff8518fdd6325d0a172bd5cb7 (diff) | |
download | qt-creator-73613d854932de2d36f2556dfe74cae717f15197.tar.gz |
AutoTest: Introduce ITestTool
Preparation for separating handling of code based and
build system based tests.
Task-number: QTCREATORBUG-23332
Change-Id: I490af5f3157fd4a8cd07d976cdfd9e4503ade97b
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/autotest/testcodeparser.cpp')
-rw-r--r-- | src/plugins/autotest/testcodeparser.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/plugins/autotest/testcodeparser.cpp b/src/plugins/autotest/testcodeparser.cpp index 1382d807d3..ab971a4e79 100644 --- a/src/plugins/autotest/testcodeparser.cpp +++ b/src/plugins/autotest/testcodeparser.cpp @@ -120,7 +120,7 @@ void TestCodeParser::syncTestFrameworks(const QList<ITestFramework *> &framework qCDebug(LOG) << "Setting" << frameworks << "as current parsers"; for (ITestFramework *framework : frameworks) { ITestParser *testParser = framework->testParser(); - QTC_ASSERT(testParser, continue); + QTC_ASSERT(testParser, continue); // buildsystem based frameworks have no code parser m_testCodeParsers.append(testParser); } } @@ -341,18 +341,22 @@ void TestCodeParser::scanForTests(const QStringList &fileList, const QList<ITest return !fn.endsWith(".qml"); }); if (!parsers.isEmpty()) { - for (ITestFramework *framework : parsers) + for (ITestFramework *framework : parsers) { + QTC_ASSERT(framework->testParser(), continue); // mark only frameworks with a parser framework->rootNode()->markForRemovalRecursively(true); + } } else { - emit requestRemoveAll(); + emit requestRemoveAllFrameworkItems(); } } else if (!parsers.isEmpty()) { for (ITestFramework *framework : parsers) { - for (const QString &filePath : list) + for (const QString &filePath : qAsConst(list)) { + QTC_ASSERT(framework->testParser(), continue); framework->rootNode()->markForRemovalRecursively(filePath); + } } } else { - for (const QString &filePath : list) + for (const QString &filePath : qAsConst(list)) emit requestRemoval(filePath); } @@ -484,7 +488,7 @@ void TestCodeParser::parsePostponedFiles() void TestCodeParser::releaseParserInternals() { - for (ITestParser *parser : m_testCodeParsers) + for (ITestParser *parser : qAsConst(m_testCodeParsers)) parser->release(); } |