qtbase/libexec
Assam Boudjelthia a905d26f14 CMake:Android: add wrapper scripts to easily run apps
Create a script that allows running an app or a test easily similar
to running on host. This improves development workflow and time by
allowing quick runs without having to manually call the various adb
commands to launch, get a pid of the app and then print the logcat,
let alone passing parameters or environment variables.

For normal apps, the app package name is retrieved by the script, run
and live logcat is printed as long as the app is still running.

For tests, the script calls androidtestrunner, allowing test parameters
to be passed to the test.

For CI debugging, this would save quite a lot of hussle and frustration
trying to run or debug a test app.

One other benefit for this is enabling running Android tests from Qt
Creator's testlib plugin without big changes to Qt Creator to support
androidtestrunner explicitly.

Because file(GENERATE) would fail if called twice for the same file,
I use file(WRITE). This is used because at the time of calling the
target executable finalizer, we don't know if the target is a test
or not, so we rely on writing the script first as a normal target,
then call it if the target is a test where it overrides the script.
For this also, parameters passed to the runner or androidtestrunner
can't handle generator expressions.

[ChangeLog][CMake][Android] Add wrapper scripts to run Android apps and
tests with ease from the host.

Task-number: QTBUG-129889
Change-Id: I84e85ce2bbf6944c8aa20bdc2c2b6d7b956bc748
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2024-10-16 20:40:08 +03:00
..
qt-android-runner.py CMake:Android: add wrapper scripts to easily run apps 2024-10-16 20:40:08 +03:00
qt-internal-configure-examples.bat.in CMake: Allow building all examples as standalone just like tests 2024-03-14 11:44:16 +01:00
qt-internal-configure-examples.in Do not assume FHS in scripts 2024-06-25 11:44:00 +02:00
qt-internal-configure-tests.bat.in Pass native path in qt-internal-configure-tests 2023-04-17 23:32:34 +02:00
qt-internal-configure-tests.in Do not assume FHS in scripts 2024-06-25 11:44:00 +02:00
qt-internal-ninja.bat.in CMake: Pass -v to ninja when using ctest --build-and-test 2022-04-04 15:41:20 +02:00
qt-internal-ninja.in CMake: Pass -v to ninja when using ctest --build-and-test 2022-04-04 15:41:20 +02:00
qt-internal-strip.bat.in CMake: Generate and use a wrapper script for stripping binaries 2022-03-24 21:50:50 +01:00
qt-internal-strip.in CMake: Generate and use a wrapper script for stripping binaries 2022-03-24 21:50:50 +01:00