Set qlogging test helper executable name via define

In the cmake port the helper executable may have a different name.

Change-Id: I0af68e73253c7f0e6680ca6f10a6ae25e336e923
This commit is contained in:
Tobias Hunger 2018-10-12 10:33:12 +02:00 committed by Simon Hausmann
parent 5ea233ca67
commit 345e6b0213
2 changed files with 3 additions and 2 deletions

View File

@ -19,3 +19,4 @@ SOURCES = ../tst_qlogging.cpp
DEFINES += QT_MESSAGELOGCONTEXT DEFINES += QT_MESSAGELOGCONTEXT
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
DEFINES += HELPER_BINARY=\\\"helper\\\"

View File

@ -822,7 +822,7 @@ void tst_qmessagehandler::qMessagePattern()
QProcess process; QProcess process;
#ifndef Q_OS_ANDROID #ifndef Q_OS_ANDROID
const QString appExe(QLatin1String("helper")); const QString appExe(QLatin1String(HELPER_BINARY));
#else #else
const QString appExe(QCoreApplication::applicationDirPath() + QLatin1String("/libhelper.so")); const QString appExe(QCoreApplication::applicationDirPath() + QLatin1String("/libhelper.so"));
#endif #endif
@ -872,7 +872,7 @@ void tst_qmessagehandler::setMessagePattern()
QProcess process; QProcess process;
#ifndef Q_OS_ANDROID #ifndef Q_OS_ANDROID
const QString appExe(QLatin1String("helper")); const QString appExe(QLatin1String(HELPER_BINARY));
#else #else
const QString appExe(QCoreApplication::applicationDirPath() + QLatin1String("/libhelper.so")); const QString appExe(QCoreApplication::applicationDirPath() + QLatin1String("/libhelper.so"));
#endif #endif