Skip to content

Commit 6e27ff6

Browse files
committed
Converted the skip test argument group to use the new builder DSL.
1 parent e0d748f commit 6e27ff6

File tree

1 file changed

+45
-64
lines changed

1 file changed

+45
-64
lines changed

utils/build_swift/driver_arguments.py

Lines changed: 45 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -893,70 +893,51 @@ def create_argument_parser():
893893
help='skip building Swift Benchmark Suite')
894894

895895
# -------------------------------------------------------------------------
896-
skip_test_group = parser.add_argument_group(
897-
title='Skip testing specified targets')
898-
skip_test_group.add_argument(
899-
'--skip-test-ios',
900-
action=arguments.action.disable,
901-
dest='test_ios',
902-
help='skip testing all iOS targets. Equivalent to specifying both '
903-
'--skip-test-ios-simulator and --skip-test-ios-host')
904-
skip_test_group.add_argument(
905-
'--skip-test-ios-simulator',
906-
action=arguments.action.disable,
907-
dest='test_ios_simulator',
908-
help='skip testing iOS simulator targets')
909-
skip_test_group.add_argument(
910-
'--skip-test-ios-32bit-simulator',
911-
action=arguments.action.disable,
912-
dest='test_ios_32bit_simulator',
913-
help='skip testing iOS 32 bit simulator targets')
914-
skip_test_group.add_argument(
915-
'--skip-test-ios-host',
916-
action=arguments.action.disable,
917-
dest='test_ios_host',
918-
help='skip testing iOS device targets on the host machine (the phone '
919-
'itself)')
920-
skip_test_group.add_argument(
921-
'--skip-test-tvos',
922-
action=arguments.action.disable,
923-
dest='test_tvos',
924-
help='skip testing all tvOS targets. Equivalent to specifying both '
925-
'--skip-test-tvos-simulator and --skip-test-tvos-host')
926-
skip_test_group.add_argument(
927-
'--skip-test-tvos-simulator',
928-
action=arguments.action.disable,
929-
dest='test_tvos_simulator',
930-
help='skip testing tvOS simulator targets')
931-
skip_test_group.add_argument(
932-
'--skip-test-tvos-host',
933-
action=arguments.action.disable,
934-
dest='test_tvos_host',
935-
help='skip testing tvOS device targets on the host machine (the TV '
936-
'itself)')
937-
skip_test_group.add_argument(
938-
'--skip-test-watchos',
939-
action=arguments.action.disable,
940-
dest='test_watchos',
941-
help='skip testing all tvOS targets. Equivalent to specifying both '
942-
'--skip-test-watchos-simulator and --skip-test-watchos-host')
943-
skip_test_group.add_argument(
944-
'--skip-test-watchos-simulator',
945-
action=arguments.action.disable,
946-
dest='test_watchos_simulator',
947-
help='skip testing watchOS simulator targets')
948-
skip_test_group.add_argument(
949-
'--skip-test-watchos-host',
950-
action=arguments.action.disable,
951-
dest='test_watchos_host',
952-
help='skip testing watchOS device targets on the host machine (the '
953-
'watch itself)')
954-
skip_test_group.add_argument(
955-
'--skip-test-android-host',
956-
action=arguments.action.disable,
957-
dest='test_android_host',
958-
help='skip testing Android device targets on the host machine (the '
959-
'phone itself)')
896+
in_group('Skip testing specified targets')
897+
898+
option('--skip-test-ios',
899+
toggle_false('test_ios'),
900+
help='skip testing all iOS targets. Equivalent to specifying both '
901+
'--skip-test-ios-simulator and --skip-test-ios-host')
902+
option('--skip-test-ios-simulator',
903+
toggle_false('test_ios_simulator'),
904+
help='skip testing iOS simulator targets')
905+
option('--skip-test-ios-32bit-simulator',
906+
toggle_false('test_ios_32bit_simulator'),
907+
help='skip testing iOS 32 bit simulator targets')
908+
option('--skip-test-ios-host',
909+
toggle_false('test_ios_host'),
910+
help='skip testing iOS device targets on the host machine (the '
911+
'phone itself)')
912+
913+
option('--skip-test-tvos',
914+
toggle_false('test_tvos'),
915+
help='skip testing all tvOS targets. Equivalent to specifying both '
916+
'--skip-test-tvos-simulator and --skip-test-tvos-host')
917+
option('--skip-test-tvos-simulator',
918+
toggle_false('test_tvos_simulator'),
919+
help='skip testing tvOS simulator targets')
920+
option('--skip-test-tvos-host',
921+
toggle_false('test_tvos_host'),
922+
help='skip testing tvOS device targets on the host machine (the '
923+
'TV itself)')
924+
925+
option('--skip-test-watchos',
926+
toggle_false('test_watchos'),
927+
help='skip testing all tvOS targets. Equivalent to specifying both '
928+
'--skip-test-watchos-simulator and --skip-test-watchos-host')
929+
option('--skip-test-watchos-simulator',
930+
toggle_false('test_watchos_simulator'),
931+
help='skip testing watchOS simulator targets')
932+
option('--skip-test-watchos-host',
933+
toggle_false('test_watchos_host'),
934+
help='skip testing watchOS device targets on the host machine (the '
935+
'watch itself)')
936+
937+
option('--skip-test-android-host',
938+
toggle_false('test_android_host'),
939+
help='skip testing Android device targets on the host machine (the '
940+
'phone itself)')
960941

961942
# -------------------------------------------------------------------------
962943
in_group('Build settings specific for LLVM')

0 commit comments

Comments
 (0)