summaryrefslogtreecommitdiffstats
path: root/tests/auto/render/graphicshelpergl3_2
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-01-12 12:28:41 +0000
committerLiang Qi <liang.qi@qt.io>2017-01-12 17:10:49 +0000
commit50457f2025f3d38234bd4b27b086e75e4267f68e (patch)
tree2e5c7ac6eb0479b692d026032dbbcd0170a5b31d /tests/auto/render/graphicshelpergl3_2
parent0e7561d6d3b89f1972939809715e25d551632a80 (diff)
Don't recreate window very rapidly in test case
Something in the QPA or with hardware GL in macOS must have changed that now makes this scenario crash at random. Let's bypass it by just creating a single context and window for the whole set of tests. Task-number: QTBUG-58107 Change-Id: Ib9a9daf2fe8502ab99c280edf46c007d44a5a1b7 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'tests/auto/render/graphicshelpergl3_2')
-rw-r--r--tests/auto/render/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/auto/render/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp b/tests/auto/render/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp
index 2a67012ec..fb0265427 100644
--- a/tests/auto/render/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp
+++ b/tests/auto/render/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp
@@ -177,7 +177,7 @@ class tst_GraphicsHelperGL3_2 : public QObject
Q_OBJECT
private Q_SLOTS:
- void init()
+ void initTestCase()
{
m_window.reset(new QWindow);
m_window->setSurfaceType(QWindow::OpenGLSurface);
@@ -209,6 +209,11 @@ private Q_SLOTS:
}
}
+ void cleanupTestCase()
+ {
+ m_glContext.doneCurrent();
+ }
+
void alphaTest()
{
if (!m_initializationSuccessful)