From 6e649f9714db58e97b68a2fe9838c71aca2ee756 Mon Sep 17 00:00:00 2001 From: Sami Nurmenniemi Date: Fri, 7 Apr 2017 09:42:22 +0300 Subject: [PATCH] Skip testing of QOpenGlConfig on platforms that don't support it Task-number: QTBUG-59966 Change-Id: If74657d0a0133c67f57bf92ae96d2d868d523f0e Reviewed-by: Simon Hausmann --- tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp b/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp index 39f7beca6ff..f8dfdbd3b04 100644 --- a/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp +++ b/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp @@ -100,6 +100,7 @@ class tst_QOpenGlConfig : public QObject Q_OBJECT private slots: + void initTestCase(); void testConfiguration(); void testGlConfiguration(); void testBugList(); @@ -162,6 +163,12 @@ static void dumpConfiguration(QTextStream &str) } } +void tst_QOpenGlConfig::initTestCase() +{ + if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL)) + QSKIP("OpenGL is not supported on this platform."); +} + void tst_QOpenGlConfig::testConfiguration() { QString result;