summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2018-03-21 15:10:25 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2018-03-26 09:24:14 +0000
commit2f42ae1ed6ea8a53c4578f70d7893e8066bbd2e8 (patch)
tree665df0f8d564d5b896115de598e310137845b9d4 /tests
parentdad5b0e0c267340ee58add21e8bca9523a2cd887 (diff)
Skip documents test when no OpenGL
Unclear why the CI tries to run stuff with the offscreen platform plugin. Change-Id: I6d04ba03d583c8a486ed379a1fa260cc58087bdd Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/documents/tst_q3dsdocuments.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/auto/documents/tst_q3dsdocuments.cpp b/tests/auto/documents/tst_q3dsdocuments.cpp
index 54b68d0..623a92c 100644
--- a/tests/auto/documents/tst_q3dsdocuments.cpp
+++ b/tests/auto/documents/tst_q3dsdocuments.cpp
@@ -35,6 +35,9 @@
#include <private/q3dsuiadocument_p.h>
#include <private/q3dsqmldocument_p.h>
+#include <QtGui/private/qguiapplication_p.h>
+#include <qpa/qplatformintegration.h>
+
class tst_Q3DSDocuments : public QObject
{
Q_OBJECT
@@ -66,8 +69,6 @@ private:
tst_Q3DSDocuments::tst_Q3DSDocuments()
{
- QSurfaceFormat::setDefaultFormat(Q3DSEngine::surfaceFormat());
-
m_validUipDoc = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?> \
<UIP version=\"3\" > \
<Project > \
@@ -110,6 +111,11 @@ tst_Q3DSDocuments::tst_Q3DSDocuments()
void tst_Q3DSDocuments::initTestCase()
{
+ if (!QGuiApplicationPrivate::instance()->platformIntegration()->hasCapability(QPlatformIntegration::OpenGL))
+ QSKIP("This platform does not support OpenGL");
+
+ QSurfaceFormat::setDefaultFormat(Q3DSEngine::surfaceFormat());
+
Q3DSUtils::setDialogsEnabled(false);
}