diff options
author | Sami Nurmenniemi <sami.nurmenniemi@qt.io> | 2017-06-08 11:39:06 +0300 |
---|---|---|
committer | Sami Nurmenniemi <sami.nurmenniemi@qt.io> | 2017-08-22 12:51:40 +0000 |
commit | c341b2b25697f937280fe3620629ac3d32c19613 (patch) | |
tree | 79d08e0061ca341e5f5f23dccba8804e395a28a6 /tests/auto/unit/qpaintervideosurface/tst_qpaintervideosurface.cpp | |
parent | ba79c575860231548b8fd8309c5f6d2b715860ca (diff) |
Enable tests for boot2qt
The tests for boot2qt were disabled with commit
b9bfe241cc3c3466ad250da80b2a7ccf087706a4. The tests can
be enabled since qtdeclarative now fallbacks to software
renderer if OpenGL is not supported.
Two changes were needed to pass tests on boot2qt
1. Add option to disable tests requiring WAV format and use
that in the boot2qt environment
2. Skip some tst_QPainterVideoSurface tests if GLContext is
not supported by the platform
Task-number: QTBUG-60268
Change-Id: I236207fedb505124a2c7edf0caccd85011ab1416
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/unit/qpaintervideosurface/tst_qpaintervideosurface.cpp')
-rw-r--r-- | tests/auto/unit/qpaintervideosurface/tst_qpaintervideosurface.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/auto/unit/qpaintervideosurface/tst_qpaintervideosurface.cpp b/tests/auto/unit/qpaintervideosurface/tst_qpaintervideosurface.cpp index 4b2136a5c..c2f18d2a4 100644 --- a/tests/auto/unit/qpaintervideosurface/tst_qpaintervideosurface.cpp +++ b/tests/auto/unit/qpaintervideosurface/tst_qpaintervideosurface.cpp @@ -557,6 +557,11 @@ void tst_QPainterVideoSurface::shaderType() { QPainterVideoSurface surface; QGLWidget widget; + if (!widget.context() + || !widget.context()->isValid()) { + QSKIP("Platform does not support GLContext"); + } + widget.show(); QTest::qWaitForWindowExposed(&widget); widget.makeCurrent(); @@ -649,6 +654,11 @@ void tst_QPainterVideoSurface::shaderTypeStarted() QFETCH(QPainterVideoSurface::ShaderType, shaderType); QGLWidget widget; + if (!widget.context() + || !widget.context()->isValid()) { + QSKIP("Platform does not support GLContext"); + } + widget.show(); QTest::qWaitForWindowExposed(&widget); widget.makeCurrent(); @@ -894,6 +904,11 @@ void tst_QPainterVideoSurface::shaderSupportedFormat() QFETCH(bool, supportedFormat); QGLWidget widget; + if (!widget.context() + || !widget.context()->isValid()) { + QSKIP("Platform does not support GLContext"); + } + widget.show(); QTest::qWaitForWindowExposed(&widget); widget.makeCurrent(); @@ -1011,6 +1026,11 @@ void tst_QPainterVideoSurface::shaderPresent() QFETCH(int, bytesPerLineB); QGLWidget widget; + if (!widget.context() + || !widget.context()->isValid()) { + QSKIP("Platform does not support GLContext"); + } + widget.show(); QTest::qWaitForWindowExposed(&widget); widget.makeCurrent(); @@ -1142,6 +1162,11 @@ void tst_QPainterVideoSurface::shaderPresentOpaqueFrame() QFETCH(QPainterVideoSurface::ShaderType, shaderType); QGLWidget widget; + if (!widget.context() + || !widget.context()->isValid()) { + QSKIP("Platform does not support GLContext"); + } + widget.show(); QTest::qWaitForWindowExposed(&widget); widget.makeCurrent(); @@ -1191,6 +1216,11 @@ void tst_QPainterVideoSurface::shaderPresentGLFrame() QFETCH(QPainterVideoSurface::ShaderType, shaderType); QGLWidget widget; + if (!widget.context() + || !widget.context()->isValid()) { + QSKIP("Platform does not support GLContext"); + } + widget.show(); QTest::qWaitForWindowExposed(&widget); widget.makeCurrent(); |