From 7987a14af1eba22f3d0b9e3f1c44fd39eda55614 Mon Sep 17 00:00:00 2001 From: Lars Toenning Date: Tue, 31 Oct 2023 22:49:37 +0100 Subject: [PATCH] Use absolute path for sharedstatetestserver --- tests/blackmisc/testsharedstate/testsharedstate.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/blackmisc/testsharedstate/testsharedstate.cpp b/tests/blackmisc/testsharedstate/testsharedstate.cpp index c440f255d..96826515e 100644 --- a/tests/blackmisc/testsharedstate/testsharedstate.cpp +++ b/tests/blackmisc/testsharedstate/testsharedstate.cpp @@ -127,8 +127,11 @@ namespace BlackMiscTest QObject::connect(&m_process, qOverload(&QProcess::finished), [](int code, QProcess::ExitStatus status) { qDebug() << "Server process exited" << (status ? "abnormally" : "normally") << "with exit code" << code; }); - m_process.start("sharedstatetestserver", QStringList()); - m_process.waitForStarted(); + m_process.start(QCoreApplication::applicationDirPath() + "/sharedstatetestserver", QStringList()); + if (!m_process.waitForStarted()) + { + qDebug() << "Server failed to start"; + } } //! dtor ~Server()