From 90007cf1bb0149c49acd3e1bf0255d578d20db26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pasi=20Pet=C3=A4j=C3=A4j=C3=A4rvi?= Date: Wed, 26 Jan 2022 11:04:32 +0200 Subject: 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 (cherry picked from commit 5bc77e9b9c9ee878e31dbf6b0254b7cdee81d73c) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/qml/qqmlapplicationengine/tst_qqmlapplicationengine.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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); -- cgit v1.2.3