From 6d6a826038e5a3fae13580e84159b99c928dc006 Mon Sep 17 00:00:00 2001 From: Sami Nurmenniemi Date: Fri, 31 Mar 2017 16:18:12 +0300 Subject: Skip OpenGL tests on platforms that don't support OpenGL Change-Id: Iff38950a940d602fbfcc35595624e56399aab53a Reviewed-by: Simon Hausmann --- tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp') diff --git a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp index b130210447..58dee6f6ca 100644 --- a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp +++ b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp @@ -31,12 +31,15 @@ #include #include #include +#include +#include class tst_QOpenGLWindow : public QObject { Q_OBJECT private slots: + void initTestCase(); void create(); void basic(); void painter(); @@ -45,6 +48,12 @@ private slots: void underOver(); }; +void tst_QOpenGLWindow::initTestCase() +{ + if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL)) + QSKIP("OpenGL is not supported on this platform."); +} + void tst_QOpenGLWindow::create() { QOpenGLWindow w; -- cgit v1.2.3