From 6b66bb9a21c3ed6bf94a9fca6a0dc20a9e64c9ad Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Tue, 8 Oct 2024 01:20:08 +0300 Subject: [PATCH] AndroidTestRunner: print test output to stdout instead of stderr by default qDebug() prints to stderr which means any process expecting the test output under stdout would not get any output, and in any case, the test output shouldn't be printed to stderr. This also applies to verbose commands output. Pick-to: 6.8 Change-Id: Ifa77757176060f6452172768f3c7950019863775 Reviewed-by: Axel Spoerl --- src/tools/androidtestrunner/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tools/androidtestrunner/main.cpp b/src/tools/androidtestrunner/main.cpp index 597660ce14f..c1ae9192608 100644 --- a/src/tools/androidtestrunner/main.cpp +++ b/src/tools/androidtestrunner/main.cpp @@ -157,7 +157,7 @@ static bool execCommand(const QString &program, const QStringList &args, const auto command = program + " "_L1 + args.join(u' '); if (verbose && g_options.verbose) - qDebug("Execute %s.", command.toUtf8().constData()); + fprintf(stdout,"Execute %s.\n", command.toUtf8().constData()); QProcess process; process.start(program, args); @@ -179,7 +179,7 @@ static bool execCommand(const QString &program, const QStringList &args, output->append(stdOut); if (verbose && g_options.verbose) - qDebug() << stdOut.constData(); + fprintf(stdout, "%s\n", stdOut.constData()); return process.exitCode() == 0; } @@ -536,7 +536,7 @@ static bool pullFiles() auto checkerIt = g_options.checkFiles.find(outSuffix); ret &= (checkerIt != g_options.checkFiles.end() && checkerIt.value()(output)); if (it.value() == "-"_L1) { - qDebug() << output.constData(); + fprintf(stdout, "%s\n", output.constData()); } else { QFile out{it.value()}; if (!out.open(QIODevice::WriteOnly))