diff options
author | Sami Nurmenniemi <sami.nurmenniemi@qt.io> | 2017-03-31 16:18:12 +0300 |
---|---|---|
committer | Sami Nurmenniemi <sami.nurmenniemi@qt.io> | 2017-04-04 11:06:38 +0000 |
commit | 6d6a826038e5a3fae13580e84159b99c928dc006 (patch) | |
tree | aa8180d46af472a0b847527783ce565fa4622470 /tests/auto/gui/qopengl/tst_qopengl.cpp | |
parent | 5377f4ec0e82dbfbd0d148ed3affc0c7b2a3cade (diff) |
Skip OpenGL tests on platforms that don't support OpenGL
Change-Id: Iff38950a940d602fbfcc35595624e56399aab53a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/gui/qopengl/tst_qopengl.cpp')
-rw-r--r-- | tests/auto/gui/qopengl/tst_qopengl.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp index 7451ef92ee..87d93e0827 100644 --- a/tests/auto/gui/qopengl/tst_qopengl.cpp +++ b/tests/auto/gui/qopengl/tst_qopengl.cpp @@ -67,6 +67,7 @@ class tst_QOpenGL : public QObject Q_OBJECT private slots: + void initTestCase(); void sharedResourceCleanup_data(); void sharedResourceCleanup(); void multiGroupSharedResourceCleanup_data(); @@ -205,6 +206,12 @@ static QSurface *createSurface(int surfaceClass) return 0; } +void tst_QOpenGL::initTestCase() +{ + if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL)) + QSKIP("OpenGL is not supported on this platform."); +} + static void common_data() { QTest::addColumn<int>("surfaceClass"); |