summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorSarah Smith <sarah.j.smith@nokia.com>2012-05-03 18:53:29 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-03 11:55:50 +0200
commitbb5ebf2a04dc2daaf6f63b365b377da3dffacf44 (patch)
treec6b10e88545654b00c9830a659267f98af15629c /tests/auto
parent5d8871017162c6145a81386b425c1664a3e3972f (diff)
Fix qml3d tests incl windows.
There are a lot of problems with our tests on platforms where the fixed-function pipeline is in force, that is no shaders are available. We have code paths that are supposed to deal with that but they're poorly maintained and now crash. Try to fix a few of them, and work around others which are exposed by the qml3d tests on windows CI boxes (that have software OpenGL 1.x). We notice that QT_QPA_PLATFORM=minimal causes a crash with QML tests that have a test function without a surrounding TestCase element. Let's fix that and see if it helps also the mysterious windows test crashing problem. Task-number: QTBUG-25276 Change-Id: Ieeb67536f86467bb6819b62319ac3cee2219a8ae Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/auto.pro1
-rw-r--r--tests/auto/qml3d/QtQuickTest/TestCase.qml254
-rw-r--r--tests/auto/qml3d/QtQuickTest/qmldir1
-rw-r--r--tests/auto/qml3d/QtQuickTest/testlogger.js164
-rw-r--r--tests/auto/qml3d/item3d/tst_missing_texture_coordinates.qml16
-rw-r--r--tests/auto/qml3d/qml3d.pro4
-rw-r--r--tests/auto/qml3d_visual/effect/test.png (renamed from tests/auto/qml3d/effect/test.png)bin159 -> 159 bytes
-rw-r--r--tests/auto/qml3d_visual/effect/tst_effect.qml (renamed from tests/auto/qml3d/effect/tst_effect.qml)0
-rw-r--r--tests/auto/qml3d_visual/modelview/textures/amethyst.jpg (renamed from tests/auto/qml3d/modelview/textures/amethyst.jpg)bin3103 -> 3103 bytes
-rw-r--r--tests/auto/qml3d_visual/modelview/textures/bigblue.jpg (renamed from tests/auto/qml3d/modelview/textures/bigblue.jpg)bin1052 -> 1052 bytes
-rw-r--r--tests/auto/qml3d_visual/modelview/textures/blueweb.jpg (renamed from tests/auto/qml3d/modelview/textures/blueweb.jpg)bin4506 -> 4506 bytes
-rw-r--r--tests/auto/qml3d_visual/modelview/textures/pastelstuff.jpg (renamed from tests/auto/qml3d/modelview/textures/pastelstuff.jpg)bin4408 -> 4408 bytes
-rw-r--r--tests/auto/qml3d_visual/modelview/textures/qtlogo.png (renamed from tests/auto/qml3d/modelview/textures/qtlogo.png)bin13923 -> 13923 bytes
-rw-r--r--tests/auto/qml3d_visual/modelview/textures/threedgreen.jpg (renamed from tests/auto/qml3d/modelview/textures/threedgreen.jpg)bin3581 -> 3581 bytes
-rw-r--r--tests/auto/qml3d_visual/modelview/tst_modelview.qml (renamed from tests/auto/qml3d/modelview/tst_modelview.qml)4
-rw-r--r--tests/auto/qml3d_visual/picking/tst_picking.qml (renamed from tests/auto/qml3d/picking/tst_picking.qml)0
-rw-r--r--tests/auto/qml3d_visual/qml3d_visual.pro14
-rw-r--r--tests/auto/qml3d_visual/tst_qml3d_visual.cpp44
-rw-r--r--tests/auto/threed/qglmaterial/tst_qglmaterial.cpp4
19 files changed, 75 insertions, 431 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index f73157dfb..76f7af0fe 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -1,2 +1,3 @@
TEMPLATE = subdirs
SUBDIRS = threed imports qml3d
+!win32 : SUBDIRS += qml3d_visual
diff --git a/tests/auto/qml3d/QtQuickTest/TestCase.qml b/tests/auto/qml3d/QtQuickTest/TestCase.qml
deleted file mode 100644
index 9ba692697..000000000
--- a/tests/auto/qml3d/QtQuickTest/TestCase.qml
+++ /dev/null
@@ -1,254 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import "testlogger.js" as TestLogger
-
-Item {
- id: testCase
- visible: false
-
- // Name of the test case to prefix the function name in messages.
- property string name
-
- // Set to true to start the test running.
- property bool when: true
-
- // Set to true once the test has completed.
- property bool completed: false
-
- // Set to true when the test is running but not yet complete.
- property bool running: false
-
- // Set to true if the test doesn't have to run (because some
- // other test failed which this one depends on).
- property bool optional: false
-
- // Internal private state
- property string currentTestCase
- property bool expectingFail
- property string expectFailMsg
- property bool prevWhen: true
- property int testId: -1
-
- TestReport { id: reporter }
-
- function fail(msg) {
- if (!msg)
- msg = "";
- if (expectingFail) {
- TestLogger.log_expect_fail(currentTestCase, expectFailMsg, msg)
- throw new Error("QtTest::expect_fail")
- } else {
- TestLogger.log_fail(currentTestCase, msg)
- throw new Error("QtTest::fail")
- }
- }
-
- function fail2(msg, msg2) {
- if (msg)
- fail(msg + ": " + msg2)
- else
- fail(msg2)
- }
-
- function verify(cond, msg) {
- if (!cond)
- fail(msg)
- }
-
- function compare(actual, expected, msg) {
- if (typeof actual == "number" && typeof expected == "number") {
- // Use a fuzzy compare if the two values are floats
- if (Math.abs(actual - expected) <= 0.00001)
- return
- } else if (typeof actual == "object" && typeof expected == "object") {
- // Does the expected value look like a vector3d?
- if ("x" in expected && "y" in expected && "z" in expected) {
- if (Math.abs(actual.x - expected.x) <= 0.00001 &&
- Math.abs(actual.y - expected.y) <= 0.00001 &&
- Math.abs(actual.z - expected.z) <= 0.00001)
- return
- fail2(msg, "actual: Qt.vector3d(" +
- actual.x + ", " + actual.y + ", " + actual.z +
- "), expected: Qt.vector3d(" +
- expected.x + ", " + expected.y + ", " + expected.z +
- ")")
- return
- }
- if (actual == expected)
- return
- } else if (actual == expected) {
- return
- }
- fail2(msg, "actual: " + actual + ", expected: " + expected)
- }
-
- function skip(msg) {
- TestLogger.log_skip(currentTestCase, msg)
- throw new Error("QtTest::skip")
- }
-
- function expectFail(msg) {
- expectingFail = true
- expectFailMsg = msg
- }
-
- property variant testCaseResult
-
- function runInternal(prop, dataDriven, arg, tag) {
- currentTestCase = TestLogger.log_prefixed_name(name, prop)
- if (dataDriven && tag)
- currentTestCase += " [" + tag + "]"
- expectingFail = false
- var success = true
- try {
- testCaseResult = testCase[prop](arg)
- if (expectingFail) {
- success = false
- TestLogger.log_expect_fail_pass(currentTestCase)
- } else if (!dataDriven) {
- TestLogger.log_pass(currentTestCase)
- }
- } catch (e) {
- testCaseResult = []
- if (e.message == "QtTest::fail") {
- success = false
- } else if (e.message.indexOf("QtTest::") != 0) {
- // Test threw an unrecognized exception - fail.
- TestLogger.log_fail(currentTestCase, e.message)
- success = false
- }
- }
- return success
- }
-
- function run() {
- TestLogger.log_start_test(reporter)
- var success = true
- running = true
- var testList = []
- for (var prop in testCase) {
- if (prop.indexOf("test_") != 0)
- continue
- if (filterTestCases.length > 0) {
- // if there is a list, only run the tests in the list
- var excludeTest = true
- for (var i = 0; i < filterTestCases.length && excludeTest; i++)
- {
- if (filterTestCases[i] == prop)
- excludeTest = false
- }
- if (excludeTest)
- continue
- }
- var tail = prop.lastIndexOf("_data");
- if (tail != -1 && tail == (prop.length - 5))
- continue
- testList.push(prop)
- }
- testList.sort()
- for (var index in testList) {
- var prop = testList[index]
- var datafunc = prop + "_data"
- if (datafunc in testCase) {
- if (runInternal(datafunc, true)) {
- var table = testCaseResult
- var successThis = true
- var haveData = false
- for (var index in table) {
- haveData = true
- var row = table[index]
- if (!runInternal(prop, true, row, row.tag))
- successThis = false
- }
- if (!haveData)
- TestLogger.log_message("WARNING: no data supplied for " + prop + "() by " + datafunc + "()")
- if (successThis) {
- var prefix;
- if (name)
- prefix = name + "::"
- currentTestCase = prefix + prop + "()"
- TestLogger.log_pass(currentTestCase)
- } else {
- success = false
- }
- } else {
- success = false
- }
- } else {
- if (!runInternal(prop, false))
- success = false
- }
- }
- currentTestCase = ""
- running = false
- completed = true
- TestLogger.log_complete_test(testId, reporter)
- return success
- }
-
- onWhenChanged: {
- if (when != prevWhen) {
- prevWhen = when
- if (when && !completed && !running)
- run()
- }
- }
-
- onOptionalChanged: {
- if (!completed) {
- if (optional)
- TestLogger.log_optional_test(testId)
- else
- TestLogger.log_mandatory_test(testId)
- }
- }
-
- Component.onCompleted: {
- testId = TestLogger.log_register_test(name)
- if (optional)
- TestLogger.log_optional_test(testId)
- prevWhen = when
- if (when && !completed && !running)
- run()
- }
-}
diff --git a/tests/auto/qml3d/QtQuickTest/qmldir b/tests/auto/qml3d/QtQuickTest/qmldir
deleted file mode 100644
index 56f9177a5..000000000
--- a/tests/auto/qml3d/QtQuickTest/qmldir
+++ /dev/null
@@ -1 +0,0 @@
-TestCase 1.0 TestCase.qml
diff --git a/tests/auto/qml3d/QtQuickTest/testlogger.js b/tests/auto/qml3d/QtQuickTest/testlogger.js
deleted file mode 100644
index 11b17680c..000000000
--- a/tests/auto/qml3d/QtQuickTest/testlogger.js
+++ /dev/null
@@ -1,164 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-.pragma library
-
-// We need a global place to store the results that can be
-// shared between multiple TestCase instances. Because QML
-// creates a separate scope for every inclusion of this file,
-// we hijack the global "Qt" object to store our data.
-function log_init_results()
-{
- if (!Qt.testResults) {
- Qt.testResults = {
- suiteName: "",
- reportedStart: false,
- numPassed: 0,
- numFailed: 0,
- numSkipped: 0,
- nextId: 0,
- testCases: [],
- reporter: null
- }
- }
-}
-
-function log_fail(testcase, msg)
-{
- if (!msg)
- msg = ""
- Qt.testResults.reporter.log_fail(testcase, msg);
- ++Qt.testResults.numFailed
-}
-
-function log_expect_fail(testcase, expectmsg, msg)
-{
- if (!msg)
- msg = ""
- if (expectmsg)
- Qt.testResults.reporter.log_expect_fail(testcase, expectmsg + " " + msg);
- else
- Qt.testResults.reporter.log_expect_fail(testcase, msg);
- ++Qt.testResults.numPassed
-}
-
-function log_expect_fail_pass(testcase)
-{
- Qt.testResults.reporter.log_expect_fail_pass(testcase);
- ++Qt.testResults.numFailed
-}
-
-function log_skip(testcase, msg)
-{
- if (!msg)
- msg = ""
- Qt.testResults.reporter.log_skip(testcase, msg);
- ++Qt.testResults.numSkipped
-}
-
-function log_pass(testcase)
-{
- Qt.testResults.reporter.log_pass(testcase);
- ++Qt.testResults.numPassed
-}
-
-function log_message(msg)
-{
- Qt.testResults.reporter.log_message(msg);
-}
-
-function log_register_test(name)
-{
- log_init_results()
- if (name && !Qt.testResults.suiteName)
- Qt.testResults.suiteName = name
- var testId = Qt.testResults.nextId++
- Qt.testResults.testCases.push(testId)
- return testId
-}
-
-function log_optional_test(testId)
-{
- log_init_results()
- var index = Qt.testResults.testCases.indexOf(testId)
- if (index >= 0)
- Qt.testResults.testCases.splice(index, 1)
-}
-
-function log_mandatory_test(testId)
-{
- log_init_results()
- var index = Qt.testResults.testCases.indexOf(testId)
- if (index == -1)
- Qt.testResults.testCases.push(testId)
-}
-
-function log_start_test(reporter)
-{
- log_init_results()
- Qt.testResults.reporter = reporter
- if (Qt.testResults.reportedStart)
- return
- Qt.testResults.reportedStart = true
-}
-
-function log_complete_test(testId, reporter)
-{
- var index = Qt.testResults.testCases.indexOf(testId)
- if (index >= 0)
- Qt.testResults.testCases.splice(index, 1)
- if (!Qt.testResults.testCases.length) {
- reporter.report(Qt.testResults.numPassed,
- Qt.testResults.numFailed,
- Qt.testResults.numSkipped)
- Qt.quit()
- }
-}
-
-function log_prefixed_name(name, funcname)
-{
- if (!name)
- name = Qt.testResults.suiteName
- if (name)
- return name + "::" + funcname + "()"
- else
- return funcname + "()"
-}
diff --git a/tests/auto/qml3d/item3d/tst_missing_texture_coordinates.qml b/tests/auto/qml3d/item3d/tst_missing_texture_coordinates.qml
index b9f24b72d..aa1a8739c 100644
--- a/tests/auto/qml3d/item3d/tst_missing_texture_coordinates.qml
+++ b/tests/auto/qml3d/item3d/tst_missing_texture_coordinates.qml
@@ -41,6 +41,7 @@
import Qt3D 1.0
import QtQuick 2.0
+import QtTest 1.0
Viewport {
width: 1000
@@ -64,11 +65,14 @@ Viewport {
onTriggered: Qt.quit()
}
- // This test is simply testing to see if the item crashes on startup,
- // so this dummy test is probably not even required
- function test_exists()
- {
- verify(testItem.visible);
- Qt.quit();
+ TestCase {
+ name: "NoTextureCoordinates"
+ // This test is simply testing to see if the item crashes on startup,
+ // so this dummy test is probably not even required
+ function test_exists()
+ {
+ verify(testItem.visible);
+ Qt.quit();
+ }
}
}
diff --git a/tests/auto/qml3d/qml3d.pro b/tests/auto/qml3d/qml3d.pro
index 9e2f628db..64250bf26 100644
--- a/tests/auto/qml3d/qml3d.pro
+++ b/tests/auto/qml3d/qml3d.pro
@@ -12,13 +12,9 @@ OTHER_FILES += \
scale3d/tst_scale3d.qml \
modelview/tst_modelview.qml \
sphere/tst_sphere.qml \
- effect/tst_effect.qml \
viewport/tst_viewport.qml \
mesh/tst_mesh.qml \
- picking/tst_picking.qml \
item3d/tst_item3d.qml \
item3d/tst_missing_texture_coordinates.qml \
item3d/tst_item3d_local_v_world.qml
TESTDATA = $$OTHER_FILES
-
-CONFIG+=insignificant_test # See QTBUG-25276
diff --git a/tests/auto/qml3d/effect/test.png b/tests/auto/qml3d_visual/effect/test.png
index 80a4868f3..80a4868f3 100644
--- a/tests/auto/qml3d/effect/test.png
+++ b/tests/auto/qml3d_visual/effect/test.png
Binary files differ
diff --git a/tests/auto/qml3d/effect/tst_effect.qml b/tests/auto/qml3d_visual/effect/tst_effect.qml
index f3749c6f1..f3749c6f1 100644
--- a/tests/auto/qml3d/effect/tst_effect.qml
+++ b/tests/auto/qml3d_visual/effect/tst_effect.qml
diff --git a/tests/auto/qml3d/modelview/textures/amethyst.jpg b/tests/auto/qml3d_visual/modelview/textures/amethyst.jpg
index 43a2c4409..43a2c4409 100644
--- a/tests/auto/qml3d/modelview/textures/amethyst.jpg
+++ b/tests/auto/qml3d_visual/modelview/textures/amethyst.jpg
Binary files differ
diff --git a/tests/auto/qml3d/modelview/textures/bigblue.jpg b/tests/auto/qml3d_visual/modelview/textures/bigblue.jpg
index 8a0bb6533..8a0bb6533 100644
--- a/tests/auto/qml3d/modelview/textures/bigblue.jpg
+++ b/tests/auto/qml3d_visual/modelview/textures/bigblue.jpg
Binary files differ
diff --git a/tests/auto/qml3d/modelview/textures/blueweb.jpg b/tests/auto/qml3d_visual/modelview/textures/blueweb.jpg
index 68f3d3507..68f3d3507 100644
--- a/tests/auto/qml3d/modelview/textures/blueweb.jpg
+++ b/tests/auto/qml3d_visual/modelview/textures/blueweb.jpg
Binary files differ
diff --git a/tests/auto/qml3d/modelview/textures/pastelstuff.jpg b/tests/auto/qml3d_visual/modelview/textures/pastelstuff.jpg
index 82da86e09..82da86e09 100644
--- a/tests/auto/qml3d/modelview/textures/pastelstuff.jpg
+++ b/tests/auto/qml3d_visual/modelview/textures/pastelstuff.jpg
Binary files differ
diff --git a/tests/auto/qml3d/modelview/textures/qtlogo.png b/tests/auto/qml3d_visual/modelview/textures/qtlogo.png
index 7d3e97eb3..7d3e97eb3 100644
--- a/tests/auto/qml3d/modelview/textures/qtlogo.png
+++ b/tests/auto/qml3d_visual/modelview/textures/qtlogo.png
Binary files differ
diff --git a/tests/auto/qml3d/modelview/textures/threedgreen.jpg b/tests/auto/qml3d_visual/modelview/textures/threedgreen.jpg
index 7624527ff..7624527ff 100644
--- a/tests/auto/qml3d/modelview/textures/threedgreen.jpg
+++ b/tests/auto/qml3d_visual/modelview/textures/threedgreen.jpg
Binary files differ
diff --git a/tests/auto/qml3d/modelview/tst_modelview.qml b/tests/auto/qml3d_visual/modelview/tst_modelview.qml
index 2f564c3e4..172eebe85 100644
--- a/tests/auto/qml3d/modelview/tst_modelview.qml
+++ b/tests/auto/qml3d_visual/modelview/tst_modelview.qml
@@ -162,7 +162,7 @@ Rectangle
TestCase {
id: modelViewTestAddingCase
// when: false
- name: "Quick3d ModelView Adding Data Test"
+ name: "Quick3d_ModelView_AddingData"
function test_changing_stringList_model() {
var viewportEmptyModelChildCount = viewport.children.length;
@@ -222,7 +222,7 @@ Rectangle
id: modelViewRemovingItemsTestCase
// Wait for event loop before performing removal tests
when: false
- name: "Quick3d ModelView Removing Data Test"
+ name: "Quick3d_ModelView_RemovingData"
function test_removing_from_listModel() {
var viewportChildCount = viewport.children.length;
diff --git a/tests/auto/qml3d/picking/tst_picking.qml b/tests/auto/qml3d_visual/picking/tst_picking.qml
index 7275726bb..7275726bb 100644
--- a/tests/auto/qml3d/picking/tst_picking.qml
+++ b/tests/auto/qml3d_visual/picking/tst_picking.qml
diff --git a/tests/auto/qml3d_visual/qml3d_visual.pro b/tests/auto/qml3d_visual/qml3d_visual.pro
new file mode 100644
index 000000000..553381cbb
--- /dev/null
+++ b/tests/auto/qml3d_visual/qml3d_visual.pro
@@ -0,0 +1,14 @@
+TEMPLATE=app
+TARGET=tst_qml3d_visual
+CONFIG += warn_on qmltestcase
+QT += qml opengl
+SOURCES += tst_qml3d_visual.cpp
+
+win32:DEFINES+=_CRT_SECURE_NO_WARNINGS
+
+OTHER_FILES += \
+ modelview/tst_modelview.qml \
+ effect/tst_effect.qml \
+ picking/tst_picking.qml
+
+TESTDATA = $$OTHER_FILES
diff --git a/tests/auto/qml3d_visual/tst_qml3d_visual.cpp b/tests/auto/qml3d_visual/tst_qml3d_visual.cpp
new file mode 100644
index 000000000..16363c332
--- /dev/null
+++ b/tests/auto/qml3d_visual/tst_qml3d_visual.cpp
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtQuickTest/quicktest.h>
+
+QUICK_TEST_MAIN(qml3d_visual)
diff --git a/tests/auto/threed/qglmaterial/tst_qglmaterial.cpp b/tests/auto/threed/qglmaterial/tst_qglmaterial.cpp
index c5ac17024..bb9f3b6a2 100644
--- a/tests/auto/threed/qglmaterial/tst_qglmaterial.cpp
+++ b/tests/auto/threed/qglmaterial/tst_qglmaterial.cpp
@@ -41,6 +41,8 @@
#include <QtTest/QtTest>
#include <QtGui/QOpenGLContext>
+#include <QOpenGLShaderProgram>
+
#include "qglmaterial.h"
#include "qglcolormaterial.h"
#include "qgltwosidedmaterial.h"
@@ -240,6 +242,8 @@ void tst_QGLMaterial::initTestCase()
widget = new TestWidget();
widget->show();
QOpenGLContext *ctx = widget->context();
+ if (!QOpenGLShaderProgram::hasOpenGLShaderPrograms(ctx))
+ QSKIP("Shaders not supported");
if (!ctx || !ctx->isValid())
QSKIP("Could not create valid GL context");