diff options
author | Mitch Curtis <[email protected]> | 2021-08-06 12:27:35 +0200 |
---|---|---|
committer | Mitch Curtis <[email protected]> | 2021-09-13 21:17:04 +0200 |
commit | e310dadef779b28845b41fb091634cd001cda9de (patch) | |
tree | 610be234e82cc53752f58521ae3beba4693ff78f /tests/auto/qml/qmlplugindump | |
parent | de0c1c8a4c834dcc080d1b374186a82cd86921ca (diff) |
Consolidate test helpers into private libraries
Previously each test would include and build sources from the shared
folder. Now we make those sources a library, build it once, then have
each test link to it instead.
We also take the opportunity to move some helpers that qtquickcontrols2
had added into the quicktestutils library where it makes sense, and
for the helpers that don't make sense to be there, move them into
quickcontrolstestutils.
We add the libraries to src/ so that they are internal modules built as
part of Qt, rather than tests. That way we can use them in a standalone
test outside of qtdeclarative.
Task-number: QTBUG-95621
Pick-to: 6.2
Change-Id: I0a2ab3976fdbff2e4414df7bdc0808f16453b80a
Reviewed-by: Fabian Kosmale <[email protected]>
Diffstat (limited to 'tests/auto/qml/qmlplugindump')
-rw-r--r-- | tests/auto/qml/qmlplugindump/CMakeLists.txt | 4 | ||||
-rw-r--r-- | tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/tests/auto/qml/qmlplugindump/CMakeLists.txt b/tests/auto/qml/qmlplugindump/CMakeLists.txt index 1bf13a2c02..96eea00938 100644 --- a/tests/auto/qml/qmlplugindump/CMakeLists.txt +++ b/tests/auto/qml/qmlplugindump/CMakeLists.txt @@ -6,15 +6,13 @@ qt_internal_add_test(tst_qmlplugindump SOURCES - ../../shared/util.cpp ../../shared/util.h tst_qmlplugindump.cpp DEFINES QT_QMLTEST_DIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}\\\" - INCLUDE_DIRECTORIES - ../../shared PUBLIC_LIBRARIES Qt::GuiPrivate Qt::Qml + Qt::QuickTestUtilsPrivate ) ## Scopes: diff --git a/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp b/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp index 17e67269f3..542c1974c5 100644 --- a/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp +++ b/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp @@ -26,14 +26,13 @@ ** ****************************************************************************/ -#include "util.h" - #include <qtest.h> #include <QLibraryInfo> #include <QDir> #include <QProcess> #include <QDebug> #include <cstdlib> +#include <QtQuickTestUtils/private/qmlutils_p.h> class tst_qmlplugindump : public QQmlDataTest { @@ -56,6 +55,7 @@ private: }; tst_qmlplugindump::tst_qmlplugindump() + : QQmlDataTest(QT_QMLTEST_DATADIR) { } |