diff --git a/src/plugins/autotest/ctest/ctesttreeitem.cpp b/src/plugins/autotest/ctest/ctesttreeitem.cpp index a09f2172f33..73c3481f970 100644 --- a/src/plugins/autotest/ctest/ctesttreeitem.cpp +++ b/src/plugins/autotest/ctest/ctesttreeitem.cpp @@ -122,8 +122,10 @@ QList CTestTreeItem::testConfigurationsFor(const QStringLi if (auto envAspect = runConfig->aspect()) env = envAspect->environment(); } - if (Utils::HostOsInfo::isWindowsHost()) + if (Utils::HostOsInfo::isWindowsHost()) { + env.set("QT_FORCE_STDERR_LOGGING", "1"); env.set("QT_LOGGING_TO_CONSOLE", "1"); + } config->setEnvironment(env); const ProjectExplorer::BuildConfiguration *buildConfig = target->activeBuildConfiguration(); if (QTC_GUARD(buildConfig)) diff --git a/src/plugins/autotest/qtest/qttest_utils.cpp b/src/plugins/autotest/qtest/qttest_utils.cpp index e3ff48174f4..8f945367066 100644 --- a/src/plugins/autotest/qtest/qttest_utils.cpp +++ b/src/plugins/autotest/qtest/qttest_utils.cpp @@ -153,8 +153,10 @@ QStringList filterInterfering(const QStringList &provided, QStringList *omitted, Utils::Environment prepareBasicEnvironment(const Utils::Environment &env) { Utils::Environment result(env); - if (Utils::HostOsInfo::isWindowsHost()) + if (Utils::HostOsInfo::isWindowsHost()) { + result.set("QT_FORCE_STDERR_LOGGING", "1"); result.set("QT_LOGGING_TO_CONSOLE", "1"); + } const int timeout = AutotestPlugin::settings()->timeout; if (timeout > 5 * 60 * 1000) // Qt5.5 introduced hard limit, Qt5.6.1 added env var to raise this result.set("QTEST_FUNCTION_TIMEOUT", QString::number(timeout));