@@ -2298,30 +2298,31 @@ testuniversal: all
22982298 $(RUNSHARED) /usr/libexec/oah/translate \
22992299 ./$(BUILDPYTHON) -E -m test -j 0 -u all $(TESTOPTS)
23002300
2301- # Run the test suite on the iOS simulator. Must be run on a macOS machine with
2302- # a full Xcode install that has an iPhone SE (3rd edition) simulator available.
2301+ # Run the test suite on an Apple Mobile (i.e., iOS/tvOS/watchOS/visionOS)
2302+ # device simulator. Must be run on a macOS machine with a full Xcode install
2303+ # that has an SE-class simulator available for the chosen platform.
23032304# This must be run *after* a `make install` has completed the build. The
23042305# testbed is configured for the framework name used to configure the build;
23052306# that name is expected to be `Python`, optionally followed by uppercased ABI
23062307# flags (e.g., `PythonT`).
2307- XCFOLDER:=iOSTestbed .$(MULTIARCH).$(shell date +%s).$$PPID
2308+ XCFOLDER:=AppleTestbed .$(MULTIARCH).$(shell date +%s).$$PPID
23082309.PHONY: testios
23092310testios:
2310- @if test "$(MACHDEP)" != "ios"; then \
2311- echo "Cannot run the iOS testbed for a non-iOS build."; \
2311+ @if test "$(MACHDEP)" != "ios" -a "$(MACHDEP)" != "tvos" -a "$(MACHDEP)" != "visionos" -a "$(MACHDEP)" != "watchos" ; then \
2312+ echo "Cannot run the Apple mobile testbed for a $(MACHDEP) build."; \
23122313 exit 1;\
23132314 fi
2314- @if test "$(findstring -iphonesimulator ,$(MULTIARCH))" != "-iphonesimulator "; then \
2315- echo "Cannot run the iOS testbed for non-simulator builds."; \
2315+ @if test "$(findstring simulator ,$(MULTIARCH))" != "simulator "; then \
2316+ echo "Cannot run the Apple mobile testbed for non-simulator builds."; \
23162317 exit 1;\
23172318 fi
23182319 @if ! test -d $(PYTHONFRAMEWORKPREFIX); then \
2319- echo "Cannot find a finalized iOS Python.framework. Have you run 'make install' to finalize the framework build?"; \
2320+ echo "Cannot find a finalized Python.framework. Have you run 'make install' to finalize the framework build?"; \
23202321 exit 1;\
23212322 fi
23222323
23232324 # Clone the testbed project into the XCFOLDER
2324- $(PYTHON_FOR_BUILD) $(srcdir)/Platforms/Apple/testbed clone --framework $(PYTHONFRAMEWORKPREFIX) "$(XCFOLDER)"
2325+ $(PYTHON_FOR_BUILD) $(srcdir)/Platforms/Apple/testbed clone --platform $(MACHDEP) -- framework $(PYTHONFRAMEWORKPREFIX) "$(XCFOLDER)"
23252326
23262327 # Run the testbed project
23272328 $(PYTHON_FOR_BUILD) "$(XCFOLDER)" run --verbose -- test -uall --single-process --rerun -W --pythoninfo
0 commit comments