summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAssam Boudjelthia <assam.boudjelthia@qt.io>2020-09-15 11:38:05 +0300
committerAssam Boudjelthia <assam.boudjelthia@qt.io>2020-09-15 09:32:08 +0000
commit3bab2d234eb4cb9b1d8b4872b978403256226b93 (patch)
tree9bfe4ba05cf506d6401302877986972e28af5bca
parent6b9a2937d635055dc1a13fe2e95b3e02aed3f1fe (diff)
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 <alexandru.croitor@qt.io>
-rw-r--r--tests/auto/corelib/global/qlogging/tst_qlogging.cpp13
1 files changed, 6 insertions, 7 deletions
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<QByteArray>()
<< "< ");
+#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<QByteArray>()
// MyClass::qt_static_metacall is explicitly marked as hidden in the Q_OBJECT macro