diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-06-12 12:18:44 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-06-14 14:52:32 +0000 |
commit | 73e722a85fbf0675938023b0207d7daac93b085a (patch) | |
tree | d7de8c55d967d169455576c92e93f1df76dde0a0 /tests/auto/controls | |
parent | 9e1efc547f3e8e16fabe0164f4d670e701cb4ead (diff) |
Replace tst_styles with tst_material & tst_universal
The CI was not able to catch failures in tst_styles, because the test
results were output by separate child processes. This change builds
three different versions of tst_controls, which each run with the
appropriate style.
Change-Id: I95b2bdd90221579a3176e827802236d80d9f1a09
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/controls')
-rw-r--r-- | tests/auto/controls/controls.pro | 17 | ||||
-rw-r--r-- | tests/auto/controls/default/default.pro | 14 | ||||
-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.pro | 15 | ||||
-rw-r--r-- | tests/auto/controls/material/tst_material.cpp | 46 | ||||
-rw-r--r-- | tests/auto/controls/universal/tst_universal.cpp | 46 | ||||
-rw-r--r-- | tests/auto/controls/universal/universal.pro | 15 |
7 files changed, 149 insertions, 14 deletions
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/controls/default/default.pro b/tests/auto/controls/default/default.pro new file mode 100644 index 00000000..6ab5b5ff --- /dev/null +++ b/tests/auto/controls/default/default.pro @@ -0,0 +1,14 @@ +TEMPLATE = app +TARGET = tst_default +CONFIG += qmltestcase + +DEFINES += TST_CONTROLS_DATA=\\\"$$QQC2_SOURCE_TREE/tests/auto/controls/data\\\" + +SOURCES += \ + $$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/controls/material/tst_material.cpp b/tests/auto/controls/material/tst_material.cpp new file mode 100644 index 00000000..2825b127 --- /dev/null +++ b/tests/auto/controls/material/tst_material.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("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_* |