@@ -620,7 +620,10 @@ def perform_in_editor_tests(dir_helper, retry_on_license_check=True):
620620
621621def run_xcodebuild (dir_helper , ios_config , device_type , target_os ):
622622 """Uses xcode project generated by Unity to build an iOS or tvOS binary."""
623- build_output_dir = os .path .join (dir_helper .output_dir , "ios_output_" + device_type )
623+ if target_os == _TVOS :
624+ build_output_dir = os .path .join (dir_helper .output_dir , "tvos_output_" + device_type )
625+ else :
626+ build_output_dir = os .path .join (dir_helper .output_dir , "ios_output_" + device_type )
624627 _run (
625628 xcodebuild .get_args_for_build (
626629 path = dir_helper .xcode_path ,
@@ -668,6 +671,8 @@ def _collect_integration_tests(config, testapps, root_output_dir, output_dir, ar
668671 android_testapp_extension = ".apk"
669672 ios_testapp_dir = "ios_output_" + _DEVICE_REAL
670673 ios_simualtor_testapp_dir = "ios_output_" + _DEVICE_VIRTUAL
674+ tvos_testapp_dir = "tvos_output_" + _DEVICE_REAL
675+ tvos_simulator_testapp_dir = "tvos_output_" + _DEVICE_VIRTUAL
671676 ios_testapp_extension = ".ipa"
672677 ios_simualtor_testapp_extension = ".app"
673678 windows_testapp_dir = "WindowsTestapp"
@@ -676,6 +681,7 @@ def _collect_integration_tests(config, testapps, root_output_dir, output_dir, ar
676681
677682 android_testapp_paths = []
678683 ios_testapp_paths = []
684+ tvos_testapp_paths = []
679685 windows_testapp_paths = []
680686 macos_testapp_paths = []
681687 linux_testapp_paths = []
@@ -689,11 +695,15 @@ def _collect_integration_tests(config, testapps, root_output_dir, output_dir, ar
689695 linux_testapp_paths .append (os .path .join (file_dir , directory ))
690696 elif ios_simualtor_testapp_dir in file_dir and directory .endswith (ios_simualtor_testapp_extension ):
691697 ios_testapp_paths .append (os .path .join (file_dir , directory ))
698+ elif tvos_simulator_testapp_dir in file_dir and directory .endswith (ios_simualtor_testapp_extension ):
699+ tvos_testapp_paths .append (os .path .join (file_dir , directory ))
692700 for file_name in file_names :
693701 if file_name .endswith (android_testapp_extension ):
694702 android_testapp_paths .append (os .path .join (file_dir , file_name ))
695703 elif ios_testapp_dir in file_dir and file_name .endswith (ios_testapp_extension ):
696704 ios_testapp_paths .append (os .path .join (file_dir , file_name ))
705+ elif tvos_testapp_dir in file_dir and file_name .endswith (ios_testapp_extension ):
706+ tvos_testapp_paths .append (os .path .join (file_dir , file_name ))
697707
698708 artifact_path = os .path .join (root_output_dir , testapps_artifact_dir )
699709 logging .info ("Collecting artifacts to: %s" , artifact_path )
@@ -704,6 +714,7 @@ def _collect_integration_tests(config, testapps, root_output_dir, output_dir, ar
704714
705715 _collect_integration_tests_platform (config , testapps , artifact_path , android_testapp_paths , _ANDROID )
706716 _collect_integration_tests_platform (config , testapps , artifact_path , ios_testapp_paths , _IOS )
717+ _collect_integration_tests_platform (config , testapps , artifact_path , tvos_testapp_paths , _TVOS )
707718 _collect_integration_tests_platform (config , testapps , artifact_path , windows_testapp_paths , _WINDOWS )
708719 _collect_integration_tests_platform (config , testapps , artifact_path , macos_testapp_paths , _MACOS )
709720 _collect_integration_tests_platform (config , testapps , artifact_path , linux_testapp_paths , _LINUX )
@@ -715,12 +726,13 @@ def _collect_integration_tests_platform(config, testapps, artifact_path, testapp
715726 return
716727
717728 for testapp in testapps :
718- os .makedirs (os .path .join (artifact_path , platform ,testapp ))
729+ os .makedirs (os .path .join (artifact_path , platform , testapp ))
730+
719731 for path in testapp_paths :
720732 for testapp in testapps :
721733 if config .get_api (testapp ).full_name in path :
722734 if os .path .isfile (path ):
723- shutil .move (path , os .path .join (artifact_path , platform , testapp ))
735+ shutil .move (path , os .path .join (artifact_path , platform , testapp ))
724736 else :
725737 shutil .move (path , os .path .join (artifact_path , platform ,testapp , os .path .basename (path )), copy_function = shutil .copytree )
726738 break
0 commit comments