Skip to content

"make testios" fails with Xcode 16+ due to changes in xcresulttool #126925

Closed
@ned-deily

Description

@ned-deily

As of Xcode 16, Apple has changed the command interface to xcresultool such that the way it is invoked when running the testios recipe in Makefile.pre.in is no longer valid, causing the iOS test step to fail while attempting to extract the results of the test run.

[...]
# Regardless of success or failure, extract and print the test output
xcrun xcresulttool get --path iOSTestbed.arm64-iphonesimulator.1731824398/arm64-iphonesimulator.xcresult \
		--id $( xcrun xcresulttool get --path iOSTestbed.arm64-iphonesimulator.1731824398/arm64-iphonesimulator.xcresult --format json | _PYTHON_PROJECT_BASE=/Users/nad/Projects/PyDev/active/dev/3x/source/build-arm64-apple-ios-simulator _PYTHON_HOST_PLATFORM=ios-13.0-arm64-iphonesimulator PYTHONPATH=../Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__ios_arm64-iphonesimulator _PYTHON_SYSCONFIGDATA_PATH=/Users/nad/Projects/PyDev/active/dev/3x/source/build-arm64-apple-ios-simulator/build/lib.ios-13.0-arm64-iphonesimulator-3.14 /Users/nad/Projects/PyDev/active/dev/3x/source/build-arm64-apple-darwin/root-arm64-apple-darwin/bin/python3 -c "import sys, json; result = json.load(sys.stdin); print(result['actions']['_values'][0]['actionResult']['logRef']['id']['_value'])" ) \
		--format json | \
		_PYTHON_PROJECT_BASE=/Users/nad/Projects/PyDev/active/dev/3x/source/build-arm64-apple-ios-simulator _PYTHON_HOST_PLATFORM=ios-13.0-arm64-iphonesimulator PYTHONPATH=../Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__ios_arm64-iphonesimulator _PYTHON_SYSCONFIGDATA_PATH=/Users/nad/Projects/PyDev/active/dev/3x/source/build-arm64-apple-ios-simulator/build/lib.ios-13.0-arm64-iphonesimulator-3.14 /Users/nad/Projects/PyDev/active/dev/3x/source/build-arm64-apple-darwin/root-arm64-apple-darwin/bin/python3 -c "import sys, json; result = json.load(sys.stdin); print(result['subsections']['_values'][1]['subsections']['_values'][0]['emittedOutput']['_value'])"
Error: This command is deprecated and will be removed in a future release, --legacy flag is required to use it.
Usage: xcresulttool get object [--legacy] --path <path> [--id <id>] [--version <version>] [--format <format>]
  See 'xcresulttool get object --help' for more information.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
    import sys, json; result = json.load(sys.stdin); print(result['actions']['_values'][0]['actionResult']['logRef']['id']['_value'])
                               ~~~~~~~~~^^^^^^^^^^^
  File "/Users/nad/Projects/PyDev/active/dev/3x/source/Lib/json/__init__.py", line 293, in load
    return loads(fp.read(),
        cls=cls, object_hook=object_hook,
        parse_float=parse_float, parse_int=parse_int,
        parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/Users/nad/Projects/PyDev/active/dev/3x/source/Lib/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ~~~~~~~~~~~~~~~~~~~~~~~^^^
  File "/Users/nad/Projects/PyDev/active/dev/3x/source/Lib/json/decoder.py", line 345, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/nad/Projects/PyDev/active/dev/3x/source/Lib/json/decoder.py", line 363, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Error: Missing value for '--id <id>'
Help:  --id <id>  The ID of the object [optional, assumes rootID if not specified].
Usage: xcresulttool get object [--legacy] --path <path> [--id <id>] [--version <version>] [--format <format>]
  See 'xcresulttool get object --help' for more information.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
    import sys, json; result = json.load(sys.stdin); print(result['subsections']['_values'][1]['subsections']['_values'][0]['emittedOutput']['_value'])
                               ~~~~~~~~~^^^^^^^^^^^
  File "/Users/nad/Projects/PyDev/active/dev/3x/source/Lib/json/__init__.py", line 293, in load
    return loads(fp.read(),
        cls=cls, object_hook=object_hook,
        parse_float=parse_float, parse_int=parse_int,
        parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/Users/nad/Projects/PyDev/active/dev/3x/source/Lib/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ~~~~~~~~~~~~~~~~~~~~~~~^^^
  File "/Users/nad/Projects/PyDev/active/dev/3x/source/Lib/json/decoder.py", line 345, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/nad/Projects/PyDev/active/dev/3x/source/Lib/json/decoder.py", line 363, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
make: *** [testios] Error 1

Linked PRs

Metadata

Metadata

Assignees

Labels

3.13bugs and security fixes3.14bugs and security fixesOS-iosbuildThe build process and cross-buildtestsTests in the Lib/test dir

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions