From 96ce1aabd434b24ae33d7d59026a09f466df62e5 Mon Sep 17 00:00:00 2001 From: Ari Parkkila Date: Thu, 2 May 2024 08:06:27 +0300 Subject: [PATCH] ptests: Fix qlogging to use relative folder Run qlogging_helper at relative working directory because CMAKE_CURRENT_BINARY_DIR is not valid when test is run after installed from package to target. Task-number: QTBUG-118680 Change-Id: Ifd46d05562006ad4adf17517fae30ca5c63bc157 Reviewed-by: Thiago Macieira --- tests/auto/corelib/global/qlogging/CMakeLists.txt | 1 - tests/auto/corelib/global/qlogging/tst_qlogging.cpp | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/auto/corelib/global/qlogging/CMakeLists.txt b/tests/auto/corelib/global/qlogging/CMakeLists.txt index b3c66aeb2e..f35c9c4192 100644 --- a/tests/auto/corelib/global/qlogging/CMakeLists.txt +++ b/tests/auto/corelib/global/qlogging/CMakeLists.txt @@ -23,7 +23,6 @@ set_target_properties(qlogging_helper PROPERTIES CXX_VISIBILITY_PRESET default) qt_internal_add_test(tst_qlogging SOURCES tst_qlogging.cpp DEFINES QT_MESSAGELOGCONTEXT - HELPER_BINARY="${CMAKE_CURRENT_BINARY_DIR}/qlogging_helper" ) add_dependencies(tst_qlogging qlogging_helper) diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp index 861e60e256..defe3ac421 100644 --- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp +++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp @@ -986,11 +986,9 @@ QString tst_qmessagehandler::backtraceHelperPath() #ifdef Q_OS_ANDROID QString appExe(QCoreApplication::applicationDirPath() + QLatin1String("/lib" BACKTRACE_HELPER_NAME ".so")); -#elif defined(Q_OS_WEBOS) +#else QString appExe(QCoreApplication::applicationDirPath() + QLatin1String("/" BACKTRACE_HELPER_NAME)); -#else - QString appExe(QLatin1String(HELPER_BINARY)); #endif return appExe; }