@@ -494,6 +494,9 @@ build the Debug variant of the Swift standard library and SDK overlay""",
494
494
run_tests_group .add_argument ("-T" , "--validation-test" ,
495
495
help = "run the validation test suite (implies --test)" ,
496
496
action = "store_true" )
497
+ run_tests_group .add_argument ("--host-test" ,
498
+ help = "run executable tests on host devices (such as iOS or tvOS)" ,
499
+ action = "store_true" )
497
500
run_tests_group .add_argument ("-B" , "--benchmark" ,
498
501
help = "run the Swift Benchmark Suite after building" ,
499
502
action = "store_true" )
@@ -530,6 +533,42 @@ build the Debug variant of the Swift standard library and SDK overlay""",
530
533
help = "skip building Swift Benchmark Suite" ,
531
534
action = "store_true" )
532
535
536
+ skip_test_group = parser .add_argument_group (
537
+ title = "Skip testing specified targets" )
538
+ skip_test_group .add_argument ("--skip-test-ios" ,
539
+ help = "skip testing all iOS targets. Equivalent to specifying both "
540
+ "--skip-test-ios-simulator and --skip-test-ios-host" ,
541
+ action = "store_true" )
542
+ skip_test_group .add_argument ("--skip-test-ios-simulator" ,
543
+ help = "skip testing iOS simulator targets" ,
544
+ action = "store_true" )
545
+ skip_test_group .add_argument ("--skip-test-ios-host" ,
546
+ help = "skip testing iOS device targets on the host machine (the phone "
547
+ "itself)" ,
548
+ action = "store_true" )
549
+ skip_test_group .add_argument ("--skip-test-tvos" ,
550
+ help = "skip testing all tvOS targets. Equivalent to specifying both "
551
+ "--skip-test-tvos-simulator and --skip-test-tvos-host" ,
552
+ action = "store_true" )
553
+ skip_test_group .add_argument ("--skip-test-tvos-simulator" ,
554
+ help = "skip testing tvOS simulator targets" ,
555
+ action = "store_true" )
556
+ skip_test_group .add_argument ("--skip-test-tvos-host" ,
557
+ help = "skip testing tvOS device targets on the host machine (the TV "
558
+ "itself)" ,
559
+ action = "store_true" )
560
+ skip_test_group .add_argument ("--skip-test-watchos" ,
561
+ help = "skip testing all tvOS targets. Equivalent to specifying both "
562
+ "--skip-test-watchos-simulator and --skip-test-watchos-host" ,
563
+ action = "store_true" )
564
+ skip_test_group .add_argument ("--skip-test-watchos-simulator" ,
565
+ help = "skip testing watchOS simulator targets" ,
566
+ action = "store_true" )
567
+ skip_test_group .add_argument ("--skip-test-watchos-host" ,
568
+ help = "skip testing watchOS device targets on the host machine (the "
569
+ "watch itself)" ,
570
+ action = "store_true" )
571
+
533
572
parser .add_argument ("-i" , "--ios" ,
534
573
help = """
535
574
also build for iOS, but disallow tests that require an iOS device""" ,
@@ -602,6 +641,15 @@ the number of parallel build jobs to use""",
602
641
'--install-prefix' ,
603
642
'--install-symroot' ,
604
643
'--symbols-package' ,
644
+ '--skip-test-ios' ,
645
+ '--skip-test-ios-simulator' ,
646
+ '--skip-test-ios-host' ,
647
+ '--skip-test-tvos' ,
648
+ '--skip-test-tvos-simulator' ,
649
+ '--skip-test-tvos-host' ,
650
+ '--skip-test-watchos' ,
651
+ '--skip-test-watchos-simulator' ,
652
+ '--skip-test-watchos-host' ,
605
653
]))
606
654
607
655
if args .host_target is None :
@@ -681,6 +729,19 @@ the number of parallel build jobs to use""",
681
729
if args .test_optimized :
682
730
args .test = True
683
731
732
+ # --skip-test-ios is merely a shorthand for host and simulator tests.
733
+ if args .skip_test_ios :
734
+ args .skip_test_ios_host = True
735
+ args .skip_test_ios_simulator = True
736
+ # --skip-test-tvos is merely a shorthand for host and simulator tests.
737
+ if args .skip_test_tvos :
738
+ args .skip_test_tvos_host = True
739
+ args .skip_test_tvos_simulator = True
740
+ # --skip-test-watchos is merely a shorthand for host and simulator tests.
741
+ if args .skip_test_watchos :
742
+ args .skip_test_watchos_host = True
743
+ args .skip_test_watchos_simulator = True
744
+
684
745
build_script_impl_inferred_args = []
685
746
686
747
if args .export_compile_commands :
@@ -708,16 +769,26 @@ the number of parallel build jobs to use""",
708
769
"--skip-test-freebsd" ,
709
770
"--skip-test-cygwin" ,
710
771
"--skip-test-osx" ,
711
- "--skip-test-ios" ,
712
- "--skip-test-tvos" ,
713
- "--skip-test-watchos" ,
772
+ "--skip-test-ios-simulator" ,
773
+ "--skip-test-ios-host" ,
774
+ "--skip-test-tvos-simulator" ,
775
+ "--skip-test-tvos-host" ,
776
+ "--skip-test-watchos-simulator" ,
777
+ "--skip-test-watchos-host" ,
714
778
]
715
779
716
780
if not args .validation_test :
717
781
build_script_impl_inferred_args += [
718
782
"--skip-test-validation"
719
783
]
720
784
785
+ if not args .host_test :
786
+ build_script_impl_inferred_args += [
787
+ "--skip-test-ios-host" ,
788
+ "--skip-test-tvos-host" ,
789
+ "--skip-test-watchos-host" ,
790
+ ]
791
+
721
792
if not args .benchmark :
722
793
build_script_impl_inferred_args += [
723
794
"--skip-test-benchmarks"
@@ -731,19 +802,22 @@ the number of parallel build jobs to use""",
731
802
if not args .ios :
732
803
build_script_impl_inferred_args += [
733
804
"--skip-build-ios" ,
734
- "--skip-test-ios"
805
+ "--skip-test-ios-simulator" ,
806
+ "--skip-test-ios-host" ,
735
807
]
736
808
737
809
if not args .tvos :
738
810
build_script_impl_inferred_args += [
739
811
"--skip-build-tvos" ,
740
- "--skip-test-tvos" ,
812
+ "--skip-test-tvos-simulator" ,
813
+ "--skip-test-tvos-host" ,
741
814
]
742
815
743
816
if not args .watchos :
744
817
build_script_impl_inferred_args += [
745
818
"--skip-build-watchos" ,
746
- "--skip-test-watchos" ,
819
+ "--skip-test-watchos-simulator" ,
820
+ "--skip-test-watchos-host" ,
747
821
]
748
822
749
823
if not args .build_lldb :
@@ -794,7 +868,7 @@ the number of parallel build jobs to use""",
794
868
"--skip-build-ios-device" ,
795
869
"--skip-build-ios-simulator" ,
796
870
"--skip-build-tvos" ,
797
- "--skip-build-tvos_device " ,
871
+ "--skip-build-tvos-device " ,
798
872
"--skip-build-tvos-simulator" ,
799
873
"--skip-build-watchos" ,
800
874
"--skip-build-watchos-device" ,
@@ -931,6 +1005,18 @@ the number of parallel build jobs to use""",
931
1005
build_script_impl_args += ["--skip-test-freebsd" ]
932
1006
if args .skip_test_cygwin :
933
1007
build_script_impl_args += ["--skip-test-cygwin" ]
1008
+ if args .skip_test_ios_host :
1009
+ build_script_impl_args += ["--skip-test-ios-host" ]
1010
+ if args .skip_test_ios_simulator :
1011
+ build_script_impl_args += ["--skip-test-ios-simulator" ]
1012
+ if args .skip_test_tvos_host :
1013
+ build_script_impl_args += ["--skip-test-tvos-host" ]
1014
+ if args .skip_test_tvos_simulator :
1015
+ build_script_impl_args += ["--skip-test-tvos-simulator" ]
1016
+ if args .skip_test_watchos_host :
1017
+ build_script_impl_args += ["--skip-test-watchos-host" ]
1018
+ if args .skip_test_watchos_simulator :
1019
+ build_script_impl_args += ["--skip-test-watchos-simulator" ]
934
1020
build_script_impl_args += build_script_impl_inferred_args
935
1021
936
1022
# If we have extra_swift_args, combine all of them together and then add
0 commit comments