From 3bab2d234eb4cb9b1d8b4872b978403256226b93 Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Tue, 15 Sep 2020 11:38:05 +0300 Subject: Tests: fix qlogging build fail for Android The macro BACKTRACE_HELPER_NAME is defined inside a block with #ifdef __GLIBC__ which is not defined on Android, thus causing the test to fail on Android. Change-Id: I55e9b3e3bae2da182481239ad88107c36e3bd438 Reviewed-by: Alexandru Croitor --- tests/auto/corelib/global/qlogging/tst_qlogging.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp index cf0fdef109..82bdfdb28a 100644 --- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp +++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp @@ -737,6 +737,12 @@ void tst_qmessagehandler::qMessagePattern_data() QTest::newRow("time-process") << "<%{time process}>%{message}" << true << (QList() << "< "); +#ifdef QT_CMAKE_BUILD +#define BACKTRACE_HELPER_NAME "qlogging_helper" +#else +#define BACKTRACE_HELPER_NAME "helper" +#endif + #ifdef __GLIBC__ #ifdef QT_NAMESPACE #define QT_NAMESPACE_STR QT_STRINGIFY(QT_NAMESPACE::) @@ -744,13 +750,6 @@ void tst_qmessagehandler::qMessagePattern_data() #define QT_NAMESPACE_STR "" #endif - -#ifdef QT_CMAKE_BUILD -#define BACKTRACE_HELPER_NAME "qlogging_helper" -#else -#define BACKTRACE_HELPER_NAME "helper" -#endif - #ifndef QT_NO_DEBUG QTest::newRow("backtrace") << "[%{backtrace}] %{message}" << true << (QList() // MyClass::qt_static_metacall is explicitly marked as hidden in the Q_OBJECT macro -- cgit v1.2.3