summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/threed/qglabstractsurface/tst_qglabstractsurface.cpp12
-rw-r--r--tests/auto/threed/qglmaterial/tst_qglmaterial.cpp6
-rw-r--r--tests/auto/threed/qglpainter/tst_qglpainter.cpp15
-rw-r--r--tests/auto/threed/qglrender/tst_qglrender.cpp3
-rw-r--r--tests/auto/threed/qopenglfunctions/tst_qopenglfunctions.cpp3
5 files changed, 39 insertions, 0 deletions
diff --git a/tests/auto/threed/qglabstractsurface/tst_qglabstractsurface.cpp b/tests/auto/threed/qglabstractsurface/tst_qglabstractsurface.cpp
index e0223e290..12633a076 100644
--- a/tests/auto/threed/qglabstractsurface/tst_qglabstractsurface.cpp
+++ b/tests/auto/threed/qglabstractsurface/tst_qglabstractsurface.cpp
@@ -79,6 +79,9 @@ bool tst_QGLAbstractSurface::isFboCurrent(QGLFramebufferObject *fbo)
void tst_QGLAbstractSurface::glWidgetSurface()
{
QGLWidget glw;
+ if (!glw.isValid())
+ QSKIP("GL Implementation not valid", SkipSingle);
+
QGLWidgetSurface surface1;
QVERIFY(surface1.surfaceType() == QGLAbstractSurface::Widget);
@@ -117,6 +120,9 @@ void tst_QGLAbstractSurface::fboSurface()
QSKIP("fbo's are not supported", SkipSingle);
QGLWidget glw;
+ if (!glw.isValid())
+ QSKIP("GL Implementation not valid", SkipSingle);
+
QGLWidgetSurface surface1(&glw);
QVERIFY(surface1.activate());
QCOMPARE(surface1.viewportGL(), QRect(0, 0, glw.width(), glw.height()));
@@ -204,6 +210,9 @@ void tst_QGLAbstractSurface::pbufferSurface()
QSKIP("pbuffer's are not supported", SkipSingle);
QGLWidget glw;
+ if (!glw.isValid())
+ QSKIP("GL Implementation not valid", SkipSingle);
+
QGLWidgetSurface surface1(&glw);
QVERIFY(surface1.activate());
QCOMPARE(surface1.viewportGL(), QRect(0, 0, glw.width(), glw.height()));
@@ -278,6 +287,9 @@ void tst_QGLAbstractSurface::pbufferSurface()
void tst_QGLAbstractSurface::subSurface()
{
QGLWidget glw;
+ if (!glw.isValid())
+ QSKIP("GL Implementation not valid", SkipSingle);
+
QGLWidgetSurface surface1(&glw);
QGLSubsurface surface2(&surface1, QRect(0, 0, 32, 16));
diff --git a/tests/auto/threed/qglmaterial/tst_qglmaterial.cpp b/tests/auto/threed/qglmaterial/tst_qglmaterial.cpp
index ea9c347b7..18545d599 100644
--- a/tests/auto/threed/qglmaterial/tst_qglmaterial.cpp
+++ b/tests/auto/threed/qglmaterial/tst_qglmaterial.cpp
@@ -689,6 +689,9 @@ static QColor litColor(const QGLMaterial &material)
void tst_QGLMaterial::standardMaterialDraw()
{
+ if (!widget->isValid())
+ QSKIP("GL Implementation not valid", SkipSingle);
+
QGLMaterial mat1;
QVERIFY(widget->runTest(&mat1));
QVERIFY(widget->sameColor(litColor(mat1)));
@@ -696,6 +699,9 @@ void tst_QGLMaterial::standardMaterialDraw()
void tst_QGLMaterial::colorMaterialDraw()
{
+ if (!widget->isValid())
+ QSKIP("GL Implementation not valid", SkipSingle);
+
QGLColorMaterial mat1;
mat1.setColor(Qt::blue);
QVERIFY(widget->runTest(&mat1));
diff --git a/tests/auto/threed/qglpainter/tst_qglpainter.cpp b/tests/auto/threed/qglpainter/tst_qglpainter.cpp
index de57190c7..a7a5b185e 100644
--- a/tests/auto/threed/qglpainter/tst_qglpainter.cpp
+++ b/tests/auto/threed/qglpainter/tst_qglpainter.cpp
@@ -92,6 +92,9 @@ void tst_QGLPainter::cleanupTestCase()
void tst_QGLPainter::clear()
{
+ if (!widget->isValid())
+ QSKIP("GL Implementation not valid", SkipSingle);
+
QVERIFY(widget->runTest(this, "clearPaint"));
}
@@ -112,6 +115,9 @@ void tst_QGLPainter::clearPaintQ(QPainter *painter, const QSize& size)
void tst_QGLPainter::drawTriangle()
{
+ if (!widget->isValid())
+ QSKIP("GL Implementation not valid", SkipSingle);
+
QVERIFY(widget->runTest(this, "drawTrianglePaint"));
}
@@ -174,6 +180,9 @@ static QRect fetchGLScissor(const QRect& windowRect)
void tst_QGLPainter::scissor()
{
+ if (!widget->isValid())
+ QSKIP("GL Implementation not valid", SkipSingle);
+
// Run a painting test to check that the scissor works.
QVERIFY(widget->runTest(this, "scissorPaint"));
@@ -435,6 +444,9 @@ static bool checkGLMatrix(GLenum, const QMatrix4x4&) { return true; }
void tst_QGLPainter::projectionMatrixStack()
{
+ if (!widget->isValid())
+ QSKIP("GL Implementation not valid", SkipSingle);
+
QGLPainter painter(widget);
painter.projectionMatrix().setToIdentity();
@@ -462,6 +474,9 @@ void tst_QGLPainter::projectionMatrixStack()
void tst_QGLPainter::modelViewMatrixStack()
{
+ if (!widget->isValid())
+ QSKIP("GL Implementation not valid", SkipSingle);
+
QGLPainter painter(widget);
painter.modelViewMatrix().setToIdentity();
diff --git a/tests/auto/threed/qglrender/tst_qglrender.cpp b/tests/auto/threed/qglrender/tst_qglrender.cpp
index 9b8388d20..d2c8a687b 100644
--- a/tests/auto/threed/qglrender/tst_qglrender.cpp
+++ b/tests/auto/threed/qglrender/tst_qglrender.cpp
@@ -239,6 +239,9 @@ void tst_QGLRender::sequence()
cl->setEffect(QGL::LitDecalTexture2D);
TestView widget(scene);
+ if (!widget.isValid())
+ QSKIP("GL Implementation not valid", SkipSingle);
+
TestPainter *ptr = new TestPainter(&widget);
widget.paintGL(ptr);
diff --git a/tests/auto/threed/qopenglfunctions/tst_qopenglfunctions.cpp b/tests/auto/threed/qopenglfunctions/tst_qopenglfunctions.cpp
index 5cab4bfd4..fdedada80 100644
--- a/tests/auto/threed/qopenglfunctions/tst_qopenglfunctions.cpp
+++ b/tests/auto/threed/qopenglfunctions/tst_qopenglfunctions.cpp
@@ -90,6 +90,9 @@ void tst_QOpenGLFunctions::features()
// Make a context current.
QGLWidget glw;
+ if (!glw.isValid())
+ QSKIP("GL Implementation not valid", SkipSingle);
+
glw.makeCurrent();
funcs.initializeGLFunctions();