summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main-lib/Qt6AppManMainPrivateMacros.cmake2
-rw-r--r--src/tools/testrunner/amtest.cpp6
-rw-r--r--src/tools/testrunner/amtest.h1
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);