From 07283f15272d4d926fc730f5f2164fbe736f0d89 Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Fri, 27 Aug 2021 11:24:09 +0300 Subject: [PATCH] Android: pass -g to testrunner to grant run time permissions Some Qt modules/tests go through features that require run-time Android permissions which are granted by user input, that of course is not ideally possible while running unit tests. So when installing the app adb can do that for us. Pick-to: 6.2 Change-Id: I92d33d5213c3779d7ca246ec0fb359d2ead4fa6f Reviewed-by: Alexandru Croitor --- src/tools/androidtestrunner/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/androidtestrunner/main.cpp b/src/tools/androidtestrunner/main.cpp index 200cf5a5edb..2e44ff61c88 100644 --- a/src/tools/androidtestrunner/main.cpp +++ b/src/tools/androidtestrunner/main.cpp @@ -488,7 +488,7 @@ int main(int argc, char *argv[]) } RunnerLocker lock; // do not install or run packages while another test is running - if (!execCommand(QStringLiteral("%1 install -r %2") + if (!execCommand(QStringLiteral("%1 install -r -g %2") .arg(g_options.adbCommand, g_options.apkPath), nullptr, g_options.verbose)) { return 1; }