summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtestblacklist.cpp
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2018-08-08 14:08:15 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2018-10-12 13:59:41 +0000
commit641eb4a96552615d898512723e2093abcaf7fbc1 (patch)
tree700f98405875b09ed5acbbac8665cb1c210b9a63 /src/testlib/qtestblacklist.cpp
parentb6427ded65cd8ec031547ae0aeaa7a31f3c6a4b1 (diff)
Remove GPU_BLACKLIST support from QTest
This reverts 4fe68ffbe5c93244562f2b56292d4ecf5ce39f56, 1dfc16f6dad1cfbd843af5ca91bbb8e02774930d and 9545bee98a2431d4ef4c3449631a5fcb8d9bd57a; this feature has not been in use for some time, so is just dead code. [ChangeLog][QtTestLib] Removed support for GPU_BLACKLIST files. Reimplementations or equivalents of QTEST_MAIN() should remove their uses of QTEST_ADD_GPU_BLACKLIST_SUPPORT and its _DEFS; they are still vacuously defined, but serve no remaining purpose and shall be undefined in due course. Change-Id: I94ffd5c37ce4e1f7cf25d3c7ae8d40696b74c911 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/testlib/qtestblacklist.cpp')
-rw-r--r--src/testlib/qtestblacklist.cpp44
1 files changed, 2 insertions, 42 deletions
diff --git a/src/testlib/qtestblacklist.cpp b/src/testlib/qtestblacklist.cpp
index f430294142..ee68328d33 100644
--- a/src/testlib/qtestblacklist.cpp
+++ b/src/testlib/qtestblacklist.cpp
@@ -220,22 +220,6 @@ static bool checkCondition(const QByteArray &condition)
static bool ignoreAll = false;
static std::set<QByteArray> *ignoredTests = 0;
-static std::set<QByteArray> *gpuFeatures = 0;
-
-Q_TESTLIB_EXPORT std::set<QByteArray> *(*qgpu_features_ptr)(const QString &) = 0;
-
-static bool isGPUTestBlacklisted(const char *slot, const char *data = 0)
-{
- const QByteArray disableKey = QByteArrayLiteral("disable_") + QByteArray(slot);
- if (gpuFeatures->find(disableKey) != gpuFeatures->end()) {
- QByteArray msg = QByteArrayLiteral("Skipped due to GPU blacklist: ") + disableKey;
- if (data)
- msg += ':' + QByteArray(data);
- QTest::qSkip(msg.constData(), __FILE__, __LINE__);
- return true;
- }
- return false;
-}
namespace QTestPrivate {
@@ -275,18 +259,7 @@ void parseBlackList()
}
}
-void parseGpuBlackList()
-{
- if (!qgpu_features_ptr)
- return;
- QString filename = QTest::qFindTestData(QStringLiteral("GPU_BLACKLIST"));
- if (filename.isEmpty())
- return;
- if (!gpuFeatures)
- gpuFeatures = qgpu_features_ptr(filename);
-}
-
-void checkBlackLists(const char *slot, const char *data)
+void checkBlackList(const char *slot, const char *data)
{
bool ignore = ignoreAll;
@@ -301,21 +274,8 @@ void checkBlackLists(const char *slot, const char *data)
}
QTestResult::setBlacklistCurrentTest(ignore);
-
- // Tests blacklisted in GPU_BLACKLIST are to be skipped. Just ignoring the result is
- // not sufficient since these are expected to crash or behave in undefined ways.
- if (!ignore && gpuFeatures) {
- QByteArray s_gpu = slot;
- ignore = isGPUTestBlacklisted(s_gpu, data);
- if (!ignore && data) {
- s_gpu += ':';
- s_gpu += data;
- isGPUTestBlacklisted(s_gpu);
- }
- }
-}
-
}
+} // QTestPrivate
QT_END_NAMESPACE