@@ -2326,6 +2326,36 @@ testvisionos:
23262326 # Run the testbed project
23272327 $(PYTHON_FOR_BUILD) "$(XCFOLDER-visionOS)" run --verbose -- test -uall --single-process --rerun -W
23282328
2329+ # Run the test suite on the tvOS simulator. Must be run on a macOS machine with
2330+ # a full Xcode install that has an iPhone SE (3rd edition) simulator available.
2331+ # This must be run *after* a `make install` has completed the build. The
2332+ # `--with-framework-name` argument *cannot* be used when configuring the build.
2333+ XCFOLDER-tvOS:=tvOSTestbed.$(MULTIARCH).$(shell date +%s).$$PPID
2334+ .PHONY: testtvos
2335+ testtvos:
2336+ @if test "$(MACHDEP)" != "tvos"; then \
2337+ echo "Cannot run the tvOS testbed for a non-tvOS build."; \
2338+ exit 1;\
2339+ fi
2340+ @if test "$(findstring -appletvsimulator,$(MULTIARCH))" != "-appletvsimulator"; then \
2341+ echo "Cannot run the tvOS testbed for non-simulator builds."; \
2342+ exit 1;\
2343+ fi
2344+ @if test $(PYTHONFRAMEWORK) != "Python"; then \
2345+ echo "Cannot run the tvOS testbed with a non-default framework name."; \
2346+ exit 1;\
2347+ fi
2348+ @if ! test -d $(PYTHONFRAMEWORKPREFIX); then \
2349+ echo "Cannot find a finalized tvOS Python.framework. Have you run 'make install' to finalize the framework build?"; \
2350+ exit 1;\
2351+ fi
2352+
2353+ # Clone the testbed project into the XCFOLDER-tvOS
2354+ $(PYTHON_FOR_BUILD) $(srcdir)/tvOS/testbed clone --framework $(PYTHONFRAMEWORKPREFIX) "$(XCFOLDER-tvOS)"
2355+
2356+ # Run the testbed project
2357+ $(PYTHON_FOR_BUILD) "$(XCFOLDER-tvOS)" run --verbose -- test -uall --single-process --rerun -W
2358+
23292359# Like test, but using --slow-ci which enables all test resources and use
23302360# longer timeout. Run an optional pybuildbot.identify script to include
23312361# information about the build environment.
0 commit comments