diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-09-15 15:39:36 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2014-09-21 20:58:41 +0200 |
commit | 10414444e1fdc3b91328aba19fb10bd92f6dc899 (patch) | |
tree | 382677984b22b3d96254373926859b6a7f73803e /src/testlib/qtestcase.cpp | |
parent | 23a03ebcd17be328508e749afeb2cd962296be3b (diff) |
Add support for blacklisting test functions
We need to have a finer grained control over the tests
we skip in our CI system. This adds a blacklisting
mechanism that allows blacklisting individual test
functions (or even test data) using a set of predefined
matching keys for the operating system and some other
relevant variables.
QTestlib will search for a file called BLACKLIST in the test
directory and parse it if found. The file contains a simple
ini style list of functions to blacklist. For details see
qtestblacklist.cpp.
Change-Id: Id3fae4b264ca99970cbf9f45bfb85fa75c1fd823
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/testlib/qtestcase.cpp')
-rw-r--r-- | src/testlib/qtestcase.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 739d341233..5d5b298740 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -63,6 +63,7 @@ #include <QtTest/private/qsignaldumper_p.h> #include <QtTest/private/qbenchmark_p.h> #include <QtTest/private/cycle_p.h> +#include <QtTest/private/qtestblacklist_p.h> #include <numeric> #include <algorithm> @@ -2016,6 +2017,9 @@ static bool qInvokeTestMethod(const char *slotName, const char *data=0) QTestResult::setSkipCurrentTest(false); if (!data || !qstrcmp(data, table.testData(curDataIndex)->dataTag())) { foundFunction = true; + + QTestPrivate::checkBlackList(slot, dataCount ? table.testData(curDataIndex)->dataTag() : 0); + QTestDataSetter s(curDataIndex >= dataCount ? static_cast<QTestData *>(0) : table.testData(curDataIndex)); @@ -2433,6 +2437,8 @@ int QTest::qExec(QObject *testObject, int argc, char **argv) } #endif + QTestPrivate::parseBlackList(); + QTestResult::reset(); QTEST_ASSERT(testObject); |