aboutsummaryrefslogtreecommitdiffstats
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:48 +0000
commit90007cf1bb0149c49acd3e1bf0255d578d20db26 (patch)
tree803ba6c7add1fdc1ea376b1e0ddc106361386a46
parent0baf2841b69b609aeeba1d1746d6bea852cbe85a (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>
-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);