Skip to content

iOS testbed fails when the dir ~/Library/Developer/XCTestDevices is empty #135101

Description

@joerick

Bug report

Bug description:

iOS testbed run fails when the dir ~/Library/Developer/XCTestDevices is empty.

As seen in pypa/cibuildwheel#2443 .

The dir ~/Library/Developer/XCTestDevices is empty on machines that are clean, e.g. CI images.

The traceback is:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/private/var/folders/x8/34szswsn0zn1ktnx8k1v16qr0000gn/T/cibw-run-pztsyqge/cp313-ios_arm64_iphonesimulator/testbed/__main__.py", line 548, in <module>
    main()
    ~~~~^^
  File "/private/var/folders/x8/34szswsn0zn1ktnx8k1v16qr0000gn/T/cibw-run-pztsyqge/cp313-ios_arm64_iphonesimulator/testbed/__main__.py", line 530, in main
    asyncio.run(
    ~~~~~~~~~~~^
        run_testbed(
        ^^^^^^^^^^^^
    ...<3 lines>...
        )
        ^
    )
    ^
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/asyncio/runners.py", line 195, in run
    return runner.run(main)
           ~~~~~~~~~~^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/asyncio/base_events.py", line 719, in run_until_complete
    return future.result()
           ~~~~~~~~~~~~~^^
  File "/private/var/folders/x8/34szswsn0zn1ktnx8k1v16qr0000gn/T/cibw-run-pztsyqge/cp313-ios_arm64_iphonesimulator/testbed/__main__.py", line 411, in run_testbed
    simulator = await select_simulator_device()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/private/var/folders/x8/34szswsn0zn1ktnx8k1v16qr0000gn/T/cibw-run-pztsyqge/cp313-ios_arm64_iphonesimulator/testbed/__main__.py", line 129, in select_simulator_device
    raw_json = await async_check_output(
               ^^^^^^^^^^^^^^^^^^^^^^^^^
        "xcrun", "simctl", "--set", "testing", "list", "-j"
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/private/var/folders/x8/34szswsn0zn1ktnx8k1v16qr0000gn/T/cibw-run-pztsyqge/cp313-ios_arm64_iphonesimulator/testbed/__main__.py", line 118, in async_check_output
    raise subprocess.CalledProcessError(
    ...<4 lines>...
    )
subprocess.CalledProcessError: Command '('xcrun', 'simctl', '--set', 'testing', 'list', '-j')' returned non-zero exit status 1.

On a machine with empty ~/Library/Developer/XCTestDevices the above command returns:

$ xcrun simctl --set testing list -j
  
Using Parallel Testing Device Clones Device Set: '/Users/runner/Library/Developer/XCTestDevices'
Provided set path does not exist: /Users/runner/Library/Developer/XCTestDevices

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Linked PRs

Activity

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

Metadata

Metadata

Assignees

Labels

3.13bugs and security fixes3.14bugs and security fixes3.15pre-release feature fixes, 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