Skip to content

Genericize iOS testbed app #126167

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

Closed
freakboy3742 opened this issue Oct 30, 2024 · 0 comments · Fixed by #126169
Closed

Genericize iOS testbed app #126167

freakboy3742 opened this issue Oct 30, 2024 · 0 comments · Fixed by #126169
Labels
3.13 bugs and security fixes 3.14 bugs and security fixes OS-ios tests Tests in the Lib/test dir type-feature A feature request or enhancement

Comments

@freakboy3742
Copy link
Contributor

freakboy3742 commented Oct 30, 2024

Feature or enhancement

Proposal:

In order to run the CPython test suite, CPython source includes an Xcode project that is able to start a Python interpreter and run the equivalent of python -m test. The Python test suite is wrapped in an Xcode XCTest suite that contains a single test - "run the python test suite". The arguments passed to the Python test suite are hard-coded in the .m file that defines the XCTest suite.

The requirement to run tests isn't unique to CPython. Any third party module that is building for iOS will need to run its own test suite.

However, the needs of the CPython test suite and any other test suite are not that dissimilar - essentially, there must be a way to run python -m <some test arguments> on the iOS simulator, and gather the output of that test suite.

It's not possible to pass in command-line arguments to the iOS simulator; but if the iOS Testbed drew it's startup arguments from the testbed app's Info.plist file, rather than hard-coding them in the test case source file, it would be possible for any app to:

  • take a copy of the iOS Testbed project;
  • copy it's own code into the project;
  • modify the Info.plist file to specify the required test arguments
  • run the module's test suite on the iOS simulator.

The iOS testbed then becomes an artefact that is reusable between projects.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

@freakboy3742 freakboy3742 added type-feature A feature request or enhancement 3.13 bugs and security fixes OS-ios 3.14 bugs and security fixes labels Oct 30, 2024
@picnixz picnixz added the tests Tests in the Lib/test dir label Oct 30, 2024
freakboy3742 added a commit that referenced this issue Nov 17, 2024
)

Modify iOS Testbed to read arguments from Info.plist.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue 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]>
freakboy3742 pushed a commit that referenced this issue Nov 18, 2024
freakboy3742 pushed a commit to freakboy3742/cpython that referenced this issue Dec 13, 2024
freakboy3742 pushed a commit to freakboy3742/cpython that referenced this issue Dec 13, 2024
freakboy3742 pushed a commit to freakboy3742/cpython that referenced this issue Dec 13, 2024
freakboy3742 pushed a commit to freakboy3742/cpython that referenced this issue Dec 13, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this issue Dec 13, 2024
freakboy3742 pushed a commit to freakboy3742/cpython that referenced this issue Dec 13, 2024
ebonnal pushed a commit to ebonnal/cpython that referenced this issue 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 bugs and security fixes OS-ios tests Tests in the Lib/test dir type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants