Android: add option to run app detached to runner script
Allow the script to install, deploy and start the app without waiting for the logs. Change-Id: Id852d827f627b902a75d1ed8101892552bd4202d Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit df3f5d88d389ef204bf9e0f86238300b23803616) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
8168d4627b
commit
1f69f4e5c9
@ -41,11 +41,12 @@ parser.add_argument('-a', '--adb', metavar='path', type=str, help='Path to adb e
|
||||
parser.add_argument('-b', '--build-path', metavar='path', type=str,
|
||||
help='Path to the Android build directory.')
|
||||
parser.add_argument('-i', '--install', action='store_true', help='Install the APK.')
|
||||
parser.add_argument('-d', '--detached', action='store_true',
|
||||
help='Start the app detached without waiting for the logcat')
|
||||
parser.add_argument('-s', '--serial', type=str, metavar='serial',
|
||||
help='Android device serial (override $ANDROID_SERIAL).')
|
||||
parser.add_argument('-p', '--apk', type=str, metavar='path', help='Path to the APK file.')
|
||||
|
||||
|
||||
args, remaining_args = parser.parse_known_args()
|
||||
|
||||
# Validate required arguments
|
||||
@ -159,6 +160,9 @@ while pid is None:
|
||||
except subprocess.CalledProcessError:
|
||||
continue
|
||||
|
||||
if args.detached:
|
||||
sys.exit(0)
|
||||
|
||||
# Add a signal handler to stop the app if the script is terminated
|
||||
interrupted = False
|
||||
def terminate_app(signum, frame):
|
||||
|
Loading…
x
Reference in New Issue
Block a user