diff options
author | Robert Griebl <robert.griebl@qt.io> | 2022-04-26 12:46:18 +0200 |
---|---|---|
committer | Robert Griebl <robert.griebl@qt.io> | 2022-04-26 19:17:30 +0000 |
commit | 5184cb19845e1b5bc25665e49e423f0dd8a25a5c (patch) | |
tree | 3610e4e943edb83e17ed7fbdfb83a32ec46ded39 /src | |
parent | 6a8ed85a1933fd7185475cb3459ec5730c81464d (diff) | |
download | qtapplicationmanager-5184cb19845e1b5bc25665e49e423f0dd8a25a5c.tar.gz |
Fix the QML tst_installer to run on Windows
Change-Id: Ic6a24d2d849a3d00e4e44f83ef6410bab4aca7c2
Pick-to: 5.15 6.2 6.3
Reviewed-by: Dominik Holland <dominik.holland@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/main-lib/Qt6AppManMainPrivateMacros.cmake | 2 | ||||
-rw-r--r-- | src/tools/testrunner/amtest.cpp | 6 | ||||
-rw-r--r-- | src/tools/testrunner/amtest.h | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/src/main-lib/Qt6AppManMainPrivateMacros.cmake b/src/main-lib/Qt6AppManMainPrivateMacros.cmake index 3b0c5653..663fffca 100644 --- a/src/main-lib/Qt6AppManMainPrivateMacros.cmake +++ b/src/main-lib/Qt6AppManMainPrivateMacros.cmake @@ -197,7 +197,7 @@ function (qt_am_internal_add_qml_test target) endif() if (ARG_TESTDATA_DIR) - list(APPEND WRAPPER_ARGS EXTRA_ARGS "-o \'systemProperties: { public: { AM_TESTDATA_DIR: ${ARG_TESTDATA_DIR} } }'") + list(APPEND WRAPPER_ARGS EXTRA_ARGS -o "\"systemProperties: { public: { AM_TESTDATA_DIR: ${ARG_TESTDATA_DIR} } }\"") endif() list(APPEND WRAPPER_ARGS EXTRA_ARGS --no-cache --no-dlt-logging) diff --git a/src/tools/testrunner/amtest.cpp b/src/tools/testrunner/amtest.cpp index 2cbd4aa3..c0c5ca8b 100644 --- a/src/tools/testrunner/amtest.cpp +++ b/src/tools/testrunner/amtest.cpp @@ -29,6 +29,7 @@ ****************************************************************************/ #include <QPointer> +#include <QDir> #include <QRegularExpression> #include <QAbstractEventDispatcher> #if defined(Q_OS_LINUX) @@ -101,6 +102,11 @@ void AmTest::aboutToBlock() emit QAbstractEventDispatcher::instance()->aboutToBlock(); } +bool AmTest::dirExists(const QString &dir) +{ + return QDir(dir).exists(); +} + #if defined(Q_OS_LINUX) QString AmTest::ps(int pid) { diff --git a/src/tools/testrunner/amtest.h b/src/tools/testrunner/amtest.h index 0fe54e3b..fbaf9db3 100644 --- a/src/tools/testrunner/amtest.h +++ b/src/tools/testrunner/amtest.h @@ -55,6 +55,7 @@ public: Q_INVOKABLE void ignoreMessage(QT_PREPEND_NAMESPACE_AM(AmTest::MsgType) type, const QRegularExpression &expression); Q_INVOKABLE int observeObjectDestroyed(QObject *obj); Q_INVOKABLE void aboutToBlock(); + Q_INVOKABLE bool dirExists(const QString &dir); #if defined(Q_OS_LINUX) Q_INVOKABLE QString ps(int pid); Q_INVOKABLE QString cmdLine(int pid); |