Skip to content

gh-158018: Factor out non-app-specific parts of the Android testbed - #158019

Open
mhsmith wants to merge 3 commits into
python:mainfrom
mhsmith:android-testbed-split-1
Open

mhsmith wants to merge 3 commits into
python:mainfrom
mhsmith:android-testbed-split-1

Conversation

@mhsmith

@mhsmith mhsmith commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

This is the first step towards splitting the Android testbed into a separate repository. For this PR, all code still remains in the cpython repository, but we create a "lower-level script" as described in the linked issue, which can be used to run Android apps other than the Python testbed.

For example, you can use the script to run one of the test apps from chaquo/chaquopy#1474:

msmith@MacBook-Pro cpython % python Platforms/Android/android_run.py --connected emulator-5554 -P chaquopy.version=3.13 -P chaquopy.packages="brotli murmurhash" ~/git/chaquo/chaquopy/server/pypi/pkgtest
Waiting for app to start - this may take several minutes
PID: 32448
test_basic (chaquopy.test.brotli.TestBrotli.test_basic) ... ok
test_basic (chaquopy.test.murmurhash.TestMurmurhash.test_basic) ... ok
----------------------------------------------------------------------
Ran 2 tests in 0.006s
OK

@freakboy3742

Copy link
Copy Markdown
Contributor

My initial impression is that it would be worth keeping consistency between platforms here - if android_run.py were moved to testbed/__main__.py, it would keep the same execution surface as iOS - python Platforms/Android/testbed --connected ...; with the added benefit that the testbed directory becomes a self-contained artefact.

IMHO, ideally, it would have the same external command surface as well - the clone subcommand is really handy for ensuring that you have a "clean" original testbed, and per-project working directory that you can run.

If there are opportunities to consolidate other arguments or details of the command surface, that would be an added bonus.

@mhsmith

mhsmith commented Sep 25, 2026

Copy link
Copy Markdown
Member Author

I agree that would be a good idea eventually, and I already suggested adding the clone command in the linked issue. However, this PR is actually working at a lower level, creating a script which can be used to test any Android app, even one that has nothing to do with Python. I don't think there's any equivalent to that in the Apple directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants