summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAssam Boudjelthia <[email protected]>2025-01-16 17:05:36 +0200
committerAssam Boudjelthia <[email protected]>2025-01-24 20:36:06 +0200
commit48dbc72c4467d120353dba46fdbc2f8ddc145629 (patch)
tree91f316cf28b29cdda4aa06363ebc26307a45446c
parent256fd95a712384c6d5b8b1841ab9c749fca89970 (diff)
AndroidTestRunner: print failed build output when no --verbose is used
This helps with better debugging where in most cases the tests are run without --verbose, but if there's a build error, it won't be clear what went wrong, and only re-running with --verbose would give such details, which is just annoying to deal with. Pick-to: 6.9 Change-Id: Icb8bcb8e5ba297d48b9e166c93523f25a21937b2 Reviewed-by: Ville Voutilainen <[email protected]>
-rw-r--r--src/tools/androidtestrunner/main.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tools/androidtestrunner/main.cpp b/src/tools/androidtestrunner/main.cpp
index 2b9199c479b..01a20f524bb 100644
--- a/src/tools/androidtestrunner/main.cpp
+++ b/src/tools/androidtestrunner/main.cpp
@@ -822,8 +822,10 @@ int main(int argc, char *argv[])
return EXIT_ERROR;
}
- if (!execCommand(g_options.makeCommand, nullptr, true)) {
- qCritical("The build command \"%s\" failed", qPrintable(g_options.makeCommand));
+ QByteArray buildOutput;
+ if (!execCommand(g_options.makeCommand, &buildOutput, true)) {
+ qCritical("The APK build command \"%s\" failed\n\n%s",
+ qPrintable(g_options.makeCommand), buildOutput.constData());
return EXIT_ERROR;
}