aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPasi Petäjäjärvi <pasi.petajajarvi@qt.io>2022-01-26 11:04:32 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-01-29 14:50:47 +0000
commit5944a87eb32edfa02db8d25c7f0c43505bb974c1 (patch)
treeb95d421804b270a3e0dda6b7ee82f305ecd63cc4 /tests
parent79b2731d5f9e30be877235a963a9c6e7050b372f (diff)
QNX: Force logging to stderr
Sub-process output is by default going to slog2 in QNX so we need to force output to stderr instead. 1: FAIL! : tst_qqmlapplicationengine::application(delayed quit) 'QString(testStdErr).endsWith(QString(expectedStdErr))' returned FALSE. ( 1: Expected ending: 1: qml: Start: delayedQuit.qml 1: qml: End 1: 1: Actual output: Task-number: QTBUG-76546 Change-Id: I4a7b6c25b079f7dcc479fc2bcbd3b079bd7bc519 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 5bc77e9b9c9ee878e31dbf6b0254b7cdee81d73c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/qqmlapplicationengine/tst_qqmlapplicationengine.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlapplicationengine/tst_qqmlapplicationengine.cpp b/tests/auto/qml/qqmlapplicationengine/tst_qqmlapplicationengine.cpp
index ed6340fd10..67c75ccce7 100644
--- a/tests/auto/qml/qqmlapplicationengine/tst_qqmlapplicationengine.cpp
+++ b/tests/auto/qml/qqmlapplicationengine/tst_qqmlapplicationengine.cpp
@@ -162,6 +162,11 @@ void tst_qqmlapplicationengine::application()
#if QT_CONFIG(process)
QDir::setCurrent(buildDir);
QProcess *testProcess = new QProcess(this);
+#ifdef Q_OS_QNX
+ QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
+ env.insert("QT_FORCE_STDERR_LOGGING", "1"); // QTBUG-76546
+ testProcess->setProcessEnvironment(env);
+#endif
QStringList args;
args << qmlFile; // QML file passed as an argument is going to be run by testapp.
testProcess->start(QLatin1String("testapp/testapp"), args);