summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2018-06-05 15:54:07 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2018-06-28 07:29:30 +0000
commitd420987d54342e6933251e7db1012b8df8a83384 (patch)
treea71e81532e7c2ed8d1c737917223d27b3678adca /tests
parent568ee7da5ad603c65704c33cfea9526d61fb4c76 (diff)
Android: fix tst_qlogging
The "app" subfolder was already excluded in the .pro-file but Android supports QProcess, so lets include it in the build. Unfortunately it currently has trouble and crashes (the child process or both processes). So we skip those tests. Task-number: QTBUG-68596 Change-Id: I2e6d0869c408bf08b22c02145db8ce522c64c617 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/global/qlogging/qlogging.pro2
-rw-r--r--tests/auto/corelib/global/qlogging/tst_qlogging.cpp18
2 files changed, 19 insertions, 1 deletions
diff --git a/tests/auto/corelib/global/qlogging/qlogging.pro b/tests/auto/corelib/global/qlogging/qlogging.pro
index 3f7c0a4074..bbe75297d5 100644
--- a/tests/auto/corelib/global/qlogging/qlogging.pro
+++ b/tests/auto/corelib/global/qlogging/qlogging.pro
@@ -1,6 +1,6 @@
TEMPLATE = subdirs
-!android:!winrt {
+!winrt {
test.depends = app
SUBDIRS += app
}
diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
index 3465385ba7..e7a3748c30 100644
--- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
+++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
@@ -101,7 +101,11 @@ tst_qmessagehandler::tst_qmessagehandler()
void tst_qmessagehandler::initTestCase()
{
#if QT_CONFIG(process)
+# ifdef Q_OS_ANDROID
+ m_appDir = QCoreApplication::applicationDirPath();
+# else // !android
m_appDir = QFINDTESTDATA("app");
+# endif
QVERIFY2(!m_appDir.isEmpty(), qPrintable(
QString::fromLatin1("Couldn't find helper app dir starting from %1.").arg(QDir::currentPath())));
@@ -818,12 +822,19 @@ void tst_qmessagehandler::qMessagePattern()
#if !QT_CONFIG(process)
QSKIP("This test requires QProcess support");
#else
+#ifdef Q_OS_ANDROID
+ QSKIP("This test crashes on Android");
+#endif
QFETCH(QString, pattern);
QFETCH(bool, valid);
QFETCH(QList<QByteArray>, expected);
QProcess process;
+#ifdef Q_OS_ANDROID
+ const QString appExe = m_appDir + "/libapp.so";
+#else // !android
const QString appExe = m_appDir + "/app";
+#endif
//
// test QT_MESSAGE_PATTERN
@@ -860,13 +871,20 @@ void tst_qmessagehandler::setMessagePattern()
#if !QT_CONFIG(process)
QSKIP("This test requires QProcess support");
#else
+#ifdef Q_OS_ANDROID
+ QSKIP("This test crashes on Android");
+#endif
//
// test qSetMessagePattern
//
QProcess process;
+#ifdef Q_OS_ANDROID
+ const QString appExe = m_appDir + "/libapp.so";
+#else // !android
const QString appExe = m_appDir + "/app";
+#endif
// make sure there is no QT_MESSAGE_PATTERN in the environment
QStringList environment = m_baseEnvironment;