aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--tests/auto/auto.pro3
-rw-r--r--tests/auto/controls/controls.pro17
-rw-r--r--tests/auto/controls/default/default.pro (renamed from tests/auto/styles/styles.pro)10
-rw-r--r--tests/auto/controls/default/tst_default.cpp (renamed from tests/auto/controls/tst_controls.cpp)10
-rw-r--r--tests/auto/controls/material/material.pro15
-rw-r--r--tests/auto/controls/material/tst_material.cpp (renamed from tests/auto/styles/tst_styles.cpp)38
-rw-r--r--tests/auto/controls/universal/tst_universal.cpp46
-rw-r--r--tests/auto/controls/universal/universal.pro15
-rw-r--r--tests/auto/styles/data/dependencies.qml7
10 files changed, 107 insertions, 58 deletions
diff --git a/.gitignore b/.gitignore
index c7378c78..5597a2f7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,7 +15,9 @@
/tests/auto/accessibility/tst_accessibility
/tests/auto/applicationwindow/tst_applicationwindow
/tests/auto/calendar/tst_calendar
-/tests/auto/controls/tst_controls
+/tests/auto/controls/default/tst_default
+/tests/auto/controls/material/tst_material
+/tests/auto/controls/universal/tst_universal
/tests/auto/drawer/tst_drawer
/tests/auto/focus/tst_focus
/tests/auto/menu/tst_menu
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 4e6672c6..b17aa77a 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -13,8 +13,7 @@ SUBDIRS += \
qquickstyleselector \
qquickuniversalstyle \
sanity \
- snippets \
- styles
+ snippets
# QTBUG-50295
!linux: SUBDIRS += \
diff --git a/tests/auto/controls/controls.pro b/tests/auto/controls/controls.pro
index d1dd6814..8f2f8e69 100644
--- a/tests/auto/controls/controls.pro
+++ b/tests/auto/controls/controls.pro
@@ -1,12 +1,5 @@
-TEMPLATE = app
-TARGET = tst_controls
-CONFIG += qmltestcase
-
-SOURCES += \
- $$PWD/tst_controls.cpp
-
-OTHER_FILES += \
- $$PWD/data/*
-
-TESTDATA += \
- $$PWD/data/tst_*
+TEMPLATE = subdirs
+SUBDIRS += \
+ default \
+ material \
+ universal
diff --git a/tests/auto/styles/styles.pro b/tests/auto/controls/default/default.pro
index 3460900c..6ab5b5ff 100644
--- a/tests/auto/styles/styles.pro
+++ b/tests/auto/controls/default/default.pro
@@ -1,8 +1,14 @@
TEMPLATE = app
-TARGET = tst_styles
+TARGET = tst_default
CONFIG += qmltestcase
DEFINES += TST_CONTROLS_DATA=\\\"$$QQC2_SOURCE_TREE/tests/auto/controls/data\\\"
SOURCES += \
- $$PWD/tst_styles.cpp
+ $$PWD/tst_default.cpp
+
+OTHER_FILES += \
+ $$PWD/../data/*
+
+TESTDATA += \
+ $$PWD/../data/tst_*
diff --git a/tests/auto/controls/tst_controls.cpp b/tests/auto/controls/default/tst_default.cpp
index 89cc39f0..68c3ab8f 100644
--- a/tests/auto/controls/tst_controls.cpp
+++ b/tests/auto/controls/default/tst_default.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@@ -35,4 +35,10 @@
****************************************************************************/
#include <QtQuickTest/quicktest.h>
-QUICK_TEST_MAIN(tst_controls)
+
+int main(int argc, char *argv[])
+{
+ QTEST_ADD_GPU_BLACKLIST_SUPPORT
+ QTEST_SET_MAIN_SOURCE_PATH
+ return quick_test_main(argc, argv, "tst_controls::Default", TST_CONTROLS_DATA);
+}
diff --git a/tests/auto/controls/material/material.pro b/tests/auto/controls/material/material.pro
new file mode 100644
index 00000000..1a8260f3
--- /dev/null
+++ b/tests/auto/controls/material/material.pro
@@ -0,0 +1,15 @@
+TEMPLATE = app
+TARGET = tst_material
+CONFIG += qmltestcase
+QT += quickcontrols2
+
+DEFINES += TST_CONTROLS_DATA=\\\"$$QQC2_SOURCE_TREE/tests/auto/controls/data\\\"
+
+SOURCES += \
+ $$PWD/tst_material.cpp
+
+OTHER_FILES += \
+ $$PWD/../data/*
+
+TESTDATA += \
+ $$PWD/../data/tst_*
diff --git a/tests/auto/styles/tst_styles.cpp b/tests/auto/controls/material/tst_material.cpp
index 049e2bc9..2825b127 100644
--- a/tests/auto/styles/tst_styles.cpp
+++ b/tests/auto/controls/material/tst_material.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@@ -34,39 +34,13 @@
**
****************************************************************************/
-#include <QtCore/qcoreapplication.h>
-#include <QtCore/qprocess.h>
#include <QtQuickTest/quicktest.h>
-
-static const char* styles[] = { "Material", "Universal" };
+#include <QtQuickControls2/qquickstyle.h>
int main(int argc, char *argv[])
{
- QByteArray style = qgetenv("QT_QUICK_CONTROLS_STYLE");
- if (!style.isEmpty())
- return quick_test_main(argc, argv, "tst_styles(" + style + ")", TST_CONTROLS_DATA);
-
- QCoreApplication app(argc, argv);
-
- int failures = 0;
- int count = sizeof(styles) / sizeof(styles[0]);
-
- for (int i = 0; i < count; ++i) {
- QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
- env.insert("QT_QUICK_CONTROLS_STYLE", styles[i]);
-
- QProcess process;
- process.setProcessEnvironment(env);
- process.setWorkingDirectory(QDir::currentPath());
- process.setProcessChannelMode(QProcess::ForwardedChannels);
-
- process.start(argv[0], app.arguments().mid(1));
- process.waitForFinished();
- if (process.exitStatus() != QProcess::NormalExit)
- return -1;
-
- failures += process.exitCode();
- }
-
- return failures;
+ QTEST_ADD_GPU_BLACKLIST_SUPPORT
+ QTEST_SET_MAIN_SOURCE_PATH
+ QQuickStyle::setStyle("Material");
+ return quick_test_main(argc, argv, "tst_controls::Material", TST_CONTROLS_DATA);
}
diff --git a/tests/auto/controls/universal/tst_universal.cpp b/tests/auto/controls/universal/tst_universal.cpp
new file mode 100644
index 00000000..de4ca85c
--- /dev/null
+++ b/tests/auto/controls/universal/tst_universal.cpp
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later 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 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtQuickTest/quicktest.h>
+#include <QtQuickControls2/qquickstyle.h>
+
+int main(int argc, char *argv[])
+{
+ QTEST_ADD_GPU_BLACKLIST_SUPPORT
+ QTEST_SET_MAIN_SOURCE_PATH
+ QQuickStyle::setStyle("Universal");
+ return quick_test_main(argc, argv, "tst_controls::Universal", TST_CONTROLS_DATA);
+}
diff --git a/tests/auto/controls/universal/universal.pro b/tests/auto/controls/universal/universal.pro
new file mode 100644
index 00000000..7a16cc64
--- /dev/null
+++ b/tests/auto/controls/universal/universal.pro
@@ -0,0 +1,15 @@
+TEMPLATE = app
+TARGET = tst_universal
+CONFIG += qmltestcase
+QT += quickcontrols2
+
+DEFINES += TST_CONTROLS_DATA=\\\"$$QQC2_SOURCE_TREE/tests/auto/controls/data\\\"
+
+SOURCES += \
+ $$PWD/tst_universal.cpp
+
+OTHER_FILES += \
+ $$PWD/../data/*
+
+TESTDATA += \
+ $$PWD/../data/tst_*
diff --git a/tests/auto/styles/data/dependencies.qml b/tests/auto/styles/data/dependencies.qml
deleted file mode 100644
index 924929cf..00000000
--- a/tests/auto/styles/data/dependencies.qml
+++ /dev/null
@@ -1,7 +0,0 @@
-import QtTest 1.0
-import QtQuick 2.6
-import QtQuick.Controls 2.0
-import QtQuick.Controls.Material 2.0
-import QtQuick.Controls.Universal 2.0
-
-Control { }