Skip to content

gh-146410: Add --pythoninfo option to regrtest - #146413

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:android_pythoninfo
Mar 26, 2026
Merged

vstinner merged 1 commit into
python:mainfrom
vstinner:android_pythoninfo

Conversation

@vstinner

@vstinner vstinner commented Mar 25, 2026 •

Copy link
Copy Markdown
Member
  • Android now runs tests with --pythoninfo to dump build information.
  • Add display_title() function.

* Android now runs tests with --pythoninfo to dump build information.
* Add display_title() function.
@vstinner

Copy link
Copy Markdown
Member Author

@freakboy3742 @mhsmith: Does it sound like a reasonable addition to the Android buildbot?

@vstinner vstinner added tests Tests in the Lib/test dir OS-android labels Mar 25, 2026
@vstinner

Copy link
Copy Markdown
Member Author

If this approach is successful on Android, I will propose a similar change for iOS which also lacks python -m test.pythoninfo output.

@freakboy3742 freakboy3742 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 - definitely seems like a good idea to me, and I agree adding the equivalent to iOS would also make sense (Apple/__main__.py has an analogous test entry point).

@vstinner
vstinner merged commit b5a27bd into python:main Mar 26, 2026
104 of 106 checks passed
@vstinner
vstinner deleted the android_pythoninfo branch March 26, 2026 09:56
@vstinner

Copy link
Copy Markdown
Member Author

Ok I merged my PR, thanks for the review.

@vstinner

Copy link
Copy Markdown
Member Author

I will keep an eye on the Android buildbot to see how it goes: https://buildbot.python.org/#/builders/1594.

@vstinner

Copy link
Copy Markdown
Member Author

Nice! https://buildbot.python.org/#/builders/1594/builds/4361 ran with my change and it works as expected. Extract of test logs:

Python build information
########################

...
build.NDEBUG: ignore assertions (macro defined)
build.Py_DEBUG: No (sys.gettotalrefcount() missing)
builtins.float.double_format: IEEE, little-endian
config[argv]: ('-m', '--slow-ci', '--single-process', '--no-randomize', '--pythoninfo')
config[orig_argv]: ('', '-W', 'error', '-bb', '-E', '-m', 'test', '--slow-ci', '--single-process', '--no-randomize', '--pythoninfo')
...
os.uname: posix.uname_result(sysname='Linux', nodename='localhost', release='5.10.110-android12-9-00004-gb92ac325368e-ab8731800', version='#1 SMP PREEMPT Tue Jun 14 13:40:53 UTC 2022', machine='aarch64')
...
platform.android_ver: AndroidVer(release='12', api_level=32, manufacturer='unknown', model='Android ATD built for arm64', device='emulator64_arm64', is_emulator=True)
platform.architecture: 64bit
platform.platform: Android-12-aarch64-64bit
...
ssl.OPENSSL_VERSION: OpenSSL 3.5.5 27 Jan 2026
...
support.is_android: True
...
sys.getandroidapilevel: 24
sys.platform: android
sys.version: 3.15.0a7+ (heads/main-dirty:b5a27bdcf03, Mar 26 2026, 10:04:01) [Clang 18.0.4 (https://android.googlesource.com/toolchain/llvm-project d8003a456
...
sysconfig[CC]: /Users/android/android-sdk/ndk/27.3.13750724/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android24-clang
...
sysconfig[HOST_GNU_TYPE]: aarch64-unknown-linux-android
sysconfig[MACHDEP]: android
sysconfig[MULTIARCH]: aarch64-linux-android
...

And I was looking for this information: sys.float_info: sys.float_info(..., iec_60559=False). So the Android platform doesn't define __STDC_IEC_559__ macro.

By the way, I can see that Android is also affected by the issue gh-145410: sys.version is truncated, it doesn't display the full Clang version: 3.15.0a7+ (heads/main-dirty:b5a27bdcf03, Mar 26 2026, 10:04:01) [Clang 18.0.4 (https://android.googlesource.com/toolchain/llvm-project d8003a456.

@mhsmith

mhsmith commented Mar 26, 2026

Copy link
Copy Markdown
Member

Looks good to me. For future reference, you can also see this in the GitHub Actions run: GHA doesn't support testing Android on aarch64, but works fine on x86_64.

@vstinner

Copy link
Copy Markdown
Member Author

Looks good to me. For future reference, you can also see this in the GitHub Actions run: GHA doesn't support testing Android on aarch64, but works fine on x86_64.

I noticed that Android on aarch64 doesn't run tests, but I missed the fact that Android on x86_64 runs tests in GHA! That's great!

clin1234 pushed a commit to clin1234/cpython that referenced this pull request Apr 16, 2026
* Android now runs tests with --pythoninfo to dump build information.
* Add display_title() function.
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
* Android now runs tests with --pythoninfo to dump build information.
* Add display_title() function.
@encukou encukou added the needs backport to 3.14 bugs and security fixes label Oct 2, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@bedevere-app

bedevere-app Bot commented Oct 2, 2026

Copy link
Copy Markdown

GH-158606 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OS-android skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants