From 186cbe30939947e3a2d33b250fc861cbee361dfe Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Tue, 4 Apr 2017 17:22:55 +0200 Subject: qmltest: Split into separate tests Running everything in one big process has high risks of problems caused by globally mutable state. It also makes running small subsets of the tests more painful than it needs to be. Make use of the new QML-only test support in qtbase to have one project per subdirectory instead. This means no more C++ "stub" binary (just run make check or qmltestrunner in the directory). This relies on qtbase/727da2965caa8bccf8bbfbdd571ed05b35251f82. Change-Id: I0da70dba19aa54e456cd183b4b6b245ee20b1f3a Reviewed-by: Simon Hausmann --- tests/auto/qmltest/BLACKLIST | 16 -------- tests/auto/qmltest/animatedimage/animatedimage.pro | 1 + tests/auto/qmltest/animations/animations.pro | 1 + tests/auto/qmltest/borderimage/borderimage.pro | 1 + tests/auto/qmltest/buttonclick/buttonclick.pro | 1 + .../qmltest/createbenchmark/createbenchmark.pro | 1 + tests/auto/qmltest/events/events.pro | 1 + tests/auto/qmltest/fontloader/fontloader.pro | 1 + tests/auto/qmltest/gradient/gradient.pro | 1 + tests/auto/qmltest/image/image.pro | 1 + tests/auto/qmltest/itemgrabber/BLACKLIST | 4 ++ tests/auto/qmltest/itemgrabber/itemgrabber.pro | 1 + tests/auto/qmltest/itemgrabber/tst_itemgrabber.qml | 4 +- tests/auto/qmltest/layout/layout.pro | 1 + tests/auto/qmltest/listmodel/listmodel.pro | 1 + tests/auto/qmltest/listview/BLACKLIST | 4 ++ tests/auto/qmltest/listview/listview.pro | 1 + tests/auto/qmltest/objectmodel/objectmodel.pro | 1 + tests/auto/qmltest/pathview/pathview.pro | 1 + tests/auto/qmltest/pixel/pixel.pro | 1 + tests/auto/qmltest/positioners/positioners.pro | 1 + tests/auto/qmltest/qmltest.pro | 44 +++++++++++++++------- tests/auto/qmltest/qqmlbinding/qqmlbinding.pro | 1 + tests/auto/qmltest/qtbug46798/qtbug46798.pro | 1 + tests/auto/qmltest/rectangle/rectangle.pro | 1 + tests/auto/qmltest/selftests/BLACKLIST | 6 +++ tests/auto/qmltest/selftests/selftests.pro | 1 + tests/auto/qmltest/shadersource/BLACKLIST | 3 ++ tests/auto/qmltest/shadersource/shadersource.pro | 1 + tests/auto/qmltest/stability/stability.pro | 1 + tests/auto/qmltest/statemachine/statemachine.pro | 1 + tests/auto/qmltest/text/text.pro | 1 + tests/auto/qmltest/textedit/BLACKLIST | 6 +++ tests/auto/qmltest/textedit/textedit.pro | 1 + tests/auto/qmltest/textinput/textinput.pro | 1 + tests/auto/qmltest/tst_qmltest.cpp | 30 --------------- tests/auto/qmltest/window/window.pro | 1 + 37 files changed, 83 insertions(+), 62 deletions(-) delete mode 100644 tests/auto/qmltest/BLACKLIST create mode 100644 tests/auto/qmltest/animatedimage/animatedimage.pro create mode 100644 tests/auto/qmltest/animations/animations.pro create mode 100644 tests/auto/qmltest/borderimage/borderimage.pro create mode 100644 tests/auto/qmltest/buttonclick/buttonclick.pro create mode 100644 tests/auto/qmltest/createbenchmark/createbenchmark.pro create mode 100644 tests/auto/qmltest/events/events.pro create mode 100644 tests/auto/qmltest/fontloader/fontloader.pro create mode 100644 tests/auto/qmltest/gradient/gradient.pro create mode 100644 tests/auto/qmltest/image/image.pro create mode 100644 tests/auto/qmltest/itemgrabber/BLACKLIST create mode 100644 tests/auto/qmltest/itemgrabber/itemgrabber.pro create mode 100644 tests/auto/qmltest/layout/layout.pro create mode 100644 tests/auto/qmltest/listmodel/listmodel.pro create mode 100644 tests/auto/qmltest/listview/BLACKLIST create mode 100644 tests/auto/qmltest/listview/listview.pro create mode 100644 tests/auto/qmltest/objectmodel/objectmodel.pro create mode 100644 tests/auto/qmltest/pathview/pathview.pro create mode 100644 tests/auto/qmltest/pixel/pixel.pro create mode 100644 tests/auto/qmltest/positioners/positioners.pro create mode 100644 tests/auto/qmltest/qqmlbinding/qqmlbinding.pro create mode 100644 tests/auto/qmltest/qtbug46798/qtbug46798.pro create mode 100644 tests/auto/qmltest/rectangle/rectangle.pro create mode 100644 tests/auto/qmltest/selftests/BLACKLIST create mode 100644 tests/auto/qmltest/selftests/selftests.pro create mode 100644 tests/auto/qmltest/shadersource/BLACKLIST create mode 100644 tests/auto/qmltest/shadersource/shadersource.pro create mode 100644 tests/auto/qmltest/stability/stability.pro create mode 100644 tests/auto/qmltest/statemachine/statemachine.pro create mode 100644 tests/auto/qmltest/text/text.pro create mode 100644 tests/auto/qmltest/textedit/BLACKLIST create mode 100644 tests/auto/qmltest/textedit/textedit.pro create mode 100644 tests/auto/qmltest/textinput/textinput.pro delete mode 100644 tests/auto/qmltest/tst_qmltest.cpp create mode 100644 tests/auto/qmltest/window/window.pro diff --git a/tests/auto/qmltest/BLACKLIST b/tests/auto/qmltest/BLACKLIST deleted file mode 100644 index e0a4ce1743..0000000000 --- a/tests/auto/qmltest/BLACKLIST +++ /dev/null @@ -1,16 +0,0 @@ -# Blacklist for testing -[SelfTests::test_blacklisted_fail] -* -[SelfTests::test_blacklistWithData:test2] -* -[shadersource-dynamic-sourceobject::test_endresult] -linux -[tst_grabImage::test_equals] -linux -[ListView::test_listInteractiveCurrentIndexEnforce] -linux -macos-10.12 -[TextEdit::test_textentry] -macos-10.12 -[TextEdit::test_textentry_char] -macos-10.12 diff --git a/tests/auto/qmltest/animatedimage/animatedimage.pro b/tests/auto/qmltest/animatedimage/animatedimage.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/animatedimage/animatedimage.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/animations/animations.pro b/tests/auto/qmltest/animations/animations.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/animations/animations.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/borderimage/borderimage.pro b/tests/auto/qmltest/borderimage/borderimage.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/borderimage/borderimage.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/buttonclick/buttonclick.pro b/tests/auto/qmltest/buttonclick/buttonclick.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/buttonclick/buttonclick.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/createbenchmark/createbenchmark.pro b/tests/auto/qmltest/createbenchmark/createbenchmark.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/createbenchmark/createbenchmark.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/events/events.pro b/tests/auto/qmltest/events/events.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/events/events.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/fontloader/fontloader.pro b/tests/auto/qmltest/fontloader/fontloader.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/fontloader/fontloader.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/gradient/gradient.pro b/tests/auto/qmltest/gradient/gradient.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/gradient/gradient.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/image/image.pro b/tests/auto/qmltest/image/image.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/image/image.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/itemgrabber/BLACKLIST b/tests/auto/qmltest/itemgrabber/BLACKLIST new file mode 100644 index 0000000000..ae7967918c --- /dev/null +++ b/tests/auto/qmltest/itemgrabber/BLACKLIST @@ -0,0 +1,4 @@ +# Blacklist for testing +[tst_grabImage::test_equals] +linux + diff --git a/tests/auto/qmltest/itemgrabber/itemgrabber.pro b/tests/auto/qmltest/itemgrabber/itemgrabber.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/itemgrabber/itemgrabber.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/itemgrabber/tst_itemgrabber.qml b/tests/auto/qmltest/itemgrabber/tst_itemgrabber.qml index a80814d6de..53ed3658c2 100644 --- a/tests/auto/qmltest/itemgrabber/tst_itemgrabber.qml +++ b/tests/auto/qmltest/itemgrabber/tst_itemgrabber.qml @@ -135,7 +135,7 @@ Item { property int callCount: 0; property bool ready: false; function handleGrab(result) { - if (!result.saveToFile("itemgrabber/image.png")) + if (!result.saveToFile("image.png")) print("Error: Failed to save image to disk..."); source = "image.png"; ready = true; @@ -149,7 +149,7 @@ Item { y: 0 property bool ready: false; function handleGrab(result) { - if (!result.saveToFile("itemgrabber/image_small.png")) + if (!result.saveToFile("image_small.png")) print("Error: Failed to save image to disk..."); source = "image_small.png"; ready = true; diff --git a/tests/auto/qmltest/layout/layout.pro b/tests/auto/qmltest/layout/layout.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/layout/layout.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/listmodel/listmodel.pro b/tests/auto/qmltest/listmodel/listmodel.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/listmodel/listmodel.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/listview/BLACKLIST b/tests/auto/qmltest/listview/BLACKLIST new file mode 100644 index 0000000000..083e2f8978 --- /dev/null +++ b/tests/auto/qmltest/listview/BLACKLIST @@ -0,0 +1,4 @@ +# Blacklist for testing +[ListView::test_listInteractiveCurrentIndexEnforce] +linux +macos-10.12 diff --git a/tests/auto/qmltest/listview/listview.pro b/tests/auto/qmltest/listview/listview.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/listview/listview.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/objectmodel/objectmodel.pro b/tests/auto/qmltest/objectmodel/objectmodel.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/objectmodel/objectmodel.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/pathview/pathview.pro b/tests/auto/qmltest/pathview/pathview.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/pathview/pathview.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/pixel/pixel.pro b/tests/auto/qmltest/pixel/pixel.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/pixel/pixel.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/positioners/positioners.pro b/tests/auto/qmltest/positioners/positioners.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/positioners/positioners.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/qmltest.pro b/tests/auto/qmltest/qmltest.pro index 52fd6bf9de..8ad1541cbc 100644 --- a/tests/auto/qmltest/qmltest.pro +++ b/tests/auto/qmltest/qmltest.pro @@ -1,14 +1,30 @@ -TEMPLATE=app -TARGET=tst_qmltest -CONFIG += qmltestcase -CONFIG += console -SOURCES += tst_qmltest.cpp - - -importFiles.files = borderimage buttonclick createbenchmark events qqmlbinding selftests - -importFiles.path = . -DEPLOYMENT += importFiles - -# Please do not make this test insignificant again, thanks. -# Just skip those unstable ones. See also QTBUG-33723. +TEMPLATE = subdirs +SUBDIRS += \ + animatedimage \ + animations \ + borderimage \ + buttonclick \ + createbenchmark \ + events \ + fontloader \ + gradient \ + image \ + itemgrabber \ + layout \ + listmodel \ + listview \ + objectmodel \ + pathview \ + pixel \ + positioners \ + qqmlbinding \ + qtbug46798 \ + rectangle \ + selftests \ + shadersource \ + stability \ + statemachine \ + text \ + textedit \ + textinput \ + window diff --git a/tests/auto/qmltest/qqmlbinding/qqmlbinding.pro b/tests/auto/qmltest/qqmlbinding/qqmlbinding.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/qqmlbinding/qqmlbinding.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/qtbug46798/qtbug46798.pro b/tests/auto/qmltest/qtbug46798/qtbug46798.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/qtbug46798/qtbug46798.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/rectangle/rectangle.pro b/tests/auto/qmltest/rectangle/rectangle.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/rectangle/rectangle.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/selftests/BLACKLIST b/tests/auto/qmltest/selftests/BLACKLIST new file mode 100644 index 0000000000..e6945d8a48 --- /dev/null +++ b/tests/auto/qmltest/selftests/BLACKLIST @@ -0,0 +1,6 @@ +# Blacklist for testing +[SelfTests::test_blacklisted_fail] +* +[SelfTests::test_blacklistWithData:test2] +* + diff --git a/tests/auto/qmltest/selftests/selftests.pro b/tests/auto/qmltest/selftests/selftests.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/selftests/selftests.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/shadersource/BLACKLIST b/tests/auto/qmltest/shadersource/BLACKLIST new file mode 100644 index 0000000000..cc1e110153 --- /dev/null +++ b/tests/auto/qmltest/shadersource/BLACKLIST @@ -0,0 +1,3 @@ +# Blacklist for testing +[shadersource-dynamic-sourceobject::test_endresult] +linux diff --git a/tests/auto/qmltest/shadersource/shadersource.pro b/tests/auto/qmltest/shadersource/shadersource.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/shadersource/shadersource.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/stability/stability.pro b/tests/auto/qmltest/stability/stability.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/stability/stability.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/statemachine/statemachine.pro b/tests/auto/qmltest/statemachine/statemachine.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/statemachine/statemachine.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/text/text.pro b/tests/auto/qmltest/text/text.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/text/text.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/textedit/BLACKLIST b/tests/auto/qmltest/textedit/BLACKLIST new file mode 100644 index 0000000000..08a86c1b89 --- /dev/null +++ b/tests/auto/qmltest/textedit/BLACKLIST @@ -0,0 +1,6 @@ +# Blacklist for testing +[TextEdit::test_textentry] +macos-10.12 +[TextEdit::test_textentry_char] +macos-10.12 + diff --git a/tests/auto/qmltest/textedit/textedit.pro b/tests/auto/qmltest/textedit/textedit.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/textedit/textedit.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/textinput/textinput.pro b/tests/auto/qmltest/textinput/textinput.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/textinput/textinput.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase diff --git a/tests/auto/qmltest/tst_qmltest.cpp b/tests/auto/qmltest/tst_qmltest.cpp deleted file mode 100644 index 3387ce8ee9..0000000000 --- a/tests/auto/qmltest/tst_qmltest.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -QUICK_TEST_MAIN(qmltest) \ No newline at end of file diff --git a/tests/auto/qmltest/window/window.pro b/tests/auto/qmltest/window/window.pro new file mode 100644 index 0000000000..a7938e7003 --- /dev/null +++ b/tests/auto/qmltest/window/window.pro @@ -0,0 +1 @@ +CONFIG += qmltestcase -- cgit v1.2.3