Skip to content

iOS testbed does not correctly handle test arguments with spaces #141442

@freakboy3742

Description

@freakboy3742

Bug report

Bug description:

The iOS testbed can be given arguments to pass to the test suite - for example:

$ python Apple/testbed clone myproject
$ python myproject run -- test arg1 arg2 'arg 3' arg4

The arguments are then written into a test plan, and used to start the test suite.

The testbed runner correctly parses the command line arguments, and writes them into the test plan. However, even though Xcode's xctestplan format is a JSON document, and arguments are specified as an array, and arg 3 in the previous example is passed as a single quoted value in that array, Xcode itself does a raw concatenation of the array content. This means that any argument that contains a space is interpreted at runtime as multiple arguments.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Other

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixes3.15new features, bugs and security fixesOS-iostype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions