AndroidTestRunner: warn if exit code retrieval fails
This helps in debugging instead of returning -1 silently. Pick-to: 6.8 Change-Id: I7d145e86af04a6cc0cd0e4a6c2dbe6c4d2fd714c Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
parent
e45d78ecba
commit
fc4d352683
@ -694,8 +694,10 @@ static int testExitCode()
|
||||
{
|
||||
QByteArray exitCodeOutput;
|
||||
const QString exitCodeCmd = "cat files/qtest_last_exit_code 2> /dev/null"_L1;
|
||||
if (!execAdbCommand({ "shell"_L1, runCommandAsUserArgs(exitCodeCmd) }, &exitCodeOutput, false))
|
||||
if (!execAdbCommand({ "shell"_L1, runCommandAsUserArgs(exitCodeCmd) }, &exitCodeOutput, false)) {
|
||||
qCritical() << "Failed to retrieve the test exit code.";
|
||||
return EXIT_ERROR;
|
||||
}
|
||||
|
||||
bool ok;
|
||||
int exitCode = exitCodeOutput.toInt(&ok);
|
||||
|
Loading…
x
Reference in New Issue
Block a user