diff options
Diffstat (limited to 'src/testlib/qtestblacklist.cpp')
-rw-r--r-- | src/testlib/qtestblacklist.cpp | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/src/testlib/qtestblacklist.cpp b/src/testlib/qtestblacklist.cpp index 868971fc17..95dfb28e69 100644 --- a/src/testlib/qtestblacklist.cpp +++ b/src/testlib/qtestblacklist.cpp @@ -23,13 +23,14 @@ using namespace Qt::StringLiterals; Blank lines and everything after # is simply ignored. An initial #-line referring to this documentation is kind to readers. Comments can also be used - to indicate the reasons for ignoring particular cases. + to indicate the reasons for ignoring particular cases. Please scope comments + to keywords if possible, to avoid confusion when additional keywords or tests + cases are added later. Each blacklist line is interpreted as a list of keywords in an AND-relationship. To blacklist a test for multiple platforms (OR-relationship), use separate lines. - The key "ci" applies only when run by COIN. The key "cmake" applies when Qt - is built using CMake. Other keys name platforms, operating systems, + The key "ci" applies only when run by COIN. Other keys name platforms, operating systems, distributions, tool-chains or architectures; a ! prefix reverses what it checks. A version, joined to a key (at present, only for distributions and for msvc) with a hyphen, limits the key to the specific version. A keyword @@ -47,24 +48,22 @@ using namespace Qt::StringLiterals; data row's name coincides with that of a local data row, some unintended matches may result; try to keep your data-row tags distinct.) - Subsequent lines give conditions for ignoring this test. + Subsequent lines give conditions for ignoring this test. You need at least + one or the group has no effect. # See qtbase/src/testlib/qtestblacklist.cpp for format # Test doesn't work on QNX at all qnx - # QTBUG-12345 [testFunction] - linux - windows 64bit + linux # QTBUG-12345 + windows 64bit # QTBUG-12345 - # Flaky in COIN on macOS, not reproducible by developers [testSlowly] - macos ci + macos ci # Flaky in COIN on macOS, not reproducible by developers - # Needs basic C++11 support [testfunction2:testData] - msvc-2010 + msvc-2010 # Needs basic C++11 support [getFile:withProxy SSL:localhost] android @@ -75,9 +74,8 @@ using namespace Qt::StringLiterals; For example, to blacklist a QML test on RHEL 7.6: - # QTBUG-12345 [Button::test_display:TextOnly] - ci rhel-7.6 + ci rhel-7.6 # QTBUG-12345 Keys are lower-case. Distribution name and version are supported if QSysInfo's productType() and productVersion() return them. @@ -118,12 +116,18 @@ static QSet<QByteArray> keywords() #ifdef Q_OS_WATCHOS << "watchos" #endif +#ifdef Q_OS_VISIONOS + << "visionos" +#endif #ifdef Q_OS_ANDROID << "android" #endif #ifdef Q_OS_QNX << "qnx" #endif +#ifdef Q_OS_VXWORKS + << "vxworks" +#endif #ifdef Q_OS_WEBOS << "webos" #endif @@ -169,8 +173,6 @@ static QSet<QByteArray> keywords() #ifdef QT_BUILD_INTERNAL << "developer-build" #endif - - << "cmake" ; QCoreApplication *app = QCoreApplication::instance(); @@ -278,7 +280,8 @@ void parseBlackList() } } -void checkBlackLists(const char *slot, const char *data, const char *global) +// Returns \c true if this test-case is blacklisted. +bool checkBlackLists(const char *slot, const char *data, const char *global) { bool ignore = ignoreAll; @@ -300,7 +303,7 @@ void checkBlackLists(const char *slot, const char *data, const char *global) } } - QTestResult::setBlacklistCurrentTest(ignore); + return ignore; } } // QTestPrivate |