Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-126167: Modify iOS Testbed to read arguments from Info.plist #126169

Merged
merged 1 commit into from
Nov 17, 2024

Conversation

freakboy3742
Copy link
Contributor

@freakboy3742 freakboy3742 commented Oct 30, 2024

Modifies the iOS testbed so that:

  1. Startup arguments are defined in the app's Info.plist, rather than hard-coded in source.
  2. A new folder named app is added to PYTHONPATH to contain Python code.
  3. A new folder named app_packages is added to PYTHONPATH to contain third-party modules (essentially a site-packages that isn't part of the Python framework)
  4. The app and app_packages folders are processed by the script that converts libraries into frameworks
  5. The unix working directory is set to the app folder.
  6. NO_COLOR is set in the environment to prevent ANSI terminal codes from being emitted. This is required because the Xcode terminal output doesn't support color, and some test systems default to coloured output.

This doesn't alter how the testbed is started or used for CPython's test suite - the app and app_packages folders are empty by default, and aren't used by CPython.

However, a third party project can copy this project, add a Python.framework, add test code to app, install wheels into app_packages, rewrite the TestArgs key in iOSTestbed-Info.plist, and run the Xcode project to evaluate the test suite.

Fixes #126167.

@freakboy3742 freakboy3742 added 3.13 bugs and security fixes OS-ios 3.14 new features, bugs and security fixes needs backport to 3.13 bugs and security fixes and removed awaiting core review labels Oct 30, 2024
@freakboy3742
Copy link
Contributor Author

!buildbot iOS

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @freakboy3742 for commit f6ad3c0 🤖

The command will test the builders whose names match following regular expression: iOS

The builders matched are:

  • iOS ARM64 Simulator PR

Copy link
Member

@ned-deily ned-deily left a comment

Choose a reason for hiding this comment

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

The changes look reasonable. However, I wasn't able to fully test them yet due to #126925.

@freakboy3742
Copy link
Contributor Author

@ned-deily Yeah - I've seen that, and I'm working on a fix that will both address that problem, fix the "don't get test results until the suite finishes" limitation, provide a useful utility for third parties to test their own code, and simplify the makefile target for CPython's iOS build.

That PR builds on this one, though; would you prefer me to merge that work into this PR, or would it be OK to merge this one as-is (on the basis CI verifies that it works as-is for Xcode 15.4)?

@ned-deily
Copy link
Member

That PR builds on this one, though; would you prefer me to merge that work into this PR, or would it be OK to merge this one as-is (on the basis CI verifies that it works as-is for Xcode 15.4)?

I think either is fine, your call.

@freakboy3742 freakboy3742 merged commit 500a471 into python:main Nov 17, 2024
49 checks passed
@miss-islington-app
Copy link

Thanks @freakboy3742 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@freakboy3742 freakboy3742 deleted the reusable-ios-testbed branch November 17, 2024 23:43
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 17, 2024
…pythonGH-126169)

Modify iOS Testbed to read arguments from Info.plist.
(cherry picked from commit 500a471)

Co-authored-by: Russell Keith-Magee <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Nov 17, 2024

GH-126940 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Nov 17, 2024
@freakboy3742
Copy link
Contributor Author

Ok - I'll merge this one; I'm currently working on the other improvements. PyCon AU is later this week, which might slow my progress a little, so a PR might not be ready until late next week.

freakboy3742 pushed a commit that referenced this pull request Nov 18, 2024
freakboy3742 pushed a commit to freakboy3742/cpython that referenced this pull request Dec 13, 2024
freakboy3742 pushed a commit to freakboy3742/cpython that referenced this pull request Dec 13, 2024
freakboy3742 pushed a commit to freakboy3742/cpython that referenced this pull request Dec 13, 2024
freakboy3742 pushed a commit to freakboy3742/cpython that referenced this pull request Dec 13, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Dec 13, 2024
freakboy3742 pushed a commit to freakboy3742/cpython that referenced this pull request Dec 13, 2024
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 bugs and security fixes 3.14 new features, bugs and security fixes OS-ios
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Genericize iOS testbed app
3 participants