From 1efed3f163164a9c98b4ea7d747507b6fdc52d63 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Fri, 13 Aug 2010 12:18:50 +1000 Subject: Don't run QGLFunctions tests if cannot create context --- tests/auto/qglfunctions/tst_qglfunctions.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/auto/qglfunctions/tst_qglfunctions.cpp b/tests/auto/qglfunctions/tst_qglfunctions.cpp index 8d6be73..73e63b5 100644 --- a/tests/auto/qglfunctions/tst_qglfunctions.cpp +++ b/tests/auto/qglfunctions/tst_qglfunctions.cpp @@ -90,6 +90,8 @@ void tst_QGLFunctions::features() // Make a context current. QGLWidget glw; + if (!glw.isValid()) + QSKIP("Could not create a GL context", SkipAll); glw.makeCurrent(); funcs.initializeGLFunctions(); @@ -192,6 +194,8 @@ void tst_QGLFunctions::multitexture() { QGLFunctions funcs; QGLWidget glw; + if (!glw.isValid()) + QSKIP("Could not create a GL context", SkipAll); glw.makeCurrent(); funcs.initializeGLFunctions(); @@ -216,6 +220,8 @@ void tst_QGLFunctions::blendColor() { QGLFunctions funcs; QGLWidget glw; + if (!glw.isValid()) + QSKIP("Could not create a GL context", SkipAll); glw.makeCurrent(); funcs.initializeGLFunctions(); -- cgit v0.12