qt6-bb10/src
Assam Boudjelthia 6aca2efd62 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>
(cherry picked from commit a905d26f14da1cf86b8490331c0cc41c2a45b283)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2024-11-04 11:00:57 +01:00
..
3rdparty SQLite: Update SQLite to v3.47.0 2024-10-23 23:00:56 +00:00
android Android: make accessibility delegate protected memeber 2024-11-01 14:31:32 +00:00
assets AssetDownloader: Sync TaskTree sources 2024-09-07 13:47:55 +00:00
concurrent Remove GENERATE_CPP_EXPORTS argument 2024-06-13 14:39:17 +00:00
corelib CMake:Android: add wrapper scripts to easily run apps 2024-11-04 11:00:57 +01:00
dbus QtDBus: disallow sending method calls without destinations on a bus 2024-10-22 07:17:08 +00:00
entrypoint CMake: Correctly annotate the Entrypoint (winmain) SBOM license ID 2024-06-19 08:15:40 +00:00
gui Freetype: Fix artificial oblique combined with other transforms 2024-11-02 16:25:07 +00:00
network Http: fix how we treat must-revalidate 2024-10-31 15:35:47 +00:00
opengl Doc: Remove usage of defunct QDoc command 2024-08-28 11:39:51 +00:00
openglwidgets Remove GENERATE_CPP_EXPORTS argument 2024-06-13 14:39:17 +00:00
platformsupport evdev: Do not take m_prevInvalid into account with absolute coordinates 2024-10-31 07:41:05 +00:00
plugins QWindows11Style: Respect background color for flat QPushButtons 2024-11-02 19:34:31 +00:00
printsupport Mark Cups::Cups optional target when building for non-APPLE systems 2024-09-29 10:37:51 +00:00
sql QSqlRelationalTableModel: properly clear relational dictionary 2024-09-08 10:08:26 +00:00
testlib TestLib: Wrap raw strings in QStringLiteral for QT_NO_CAST_FROM_ASCII 2024-11-02 19:35:18 +00:00
tools CMake: Add doc_tools build and install targets 2024-11-02 20:34:37 +01:00
widgets QStyleSheetStyle: Don't calc size for CT_SpinBox when not handled 2024-11-02 10:12:28 +00:00
xml QtXml: be systematic about feature dom 2024-08-29 18:21:29 +00:00
CMakeLists.txt Add Qt icon library for examples 2023-04-22 18:14:38 +03:00