File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -538,6 +538,9 @@ details of the setups of other systems or automated environments.""")
538
538
539
539
run_tests_group = parser .add_argument_group (
540
540
title = "Run tests" )
541
+
542
+ # NOTE: We can't merge -t and --test, because nargs='?' makes
543
+ # `-ti` to be treated as `-t=i`.
541
544
run_tests_group .add_argument (
542
545
"-t" ,
543
546
help = "test Swift after building" ,
@@ -566,6 +569,20 @@ details of the setups of other systems or automated environments.""")
566
569
type = argparse_bool ,
567
570
default = False ,
568
571
const = True )
572
+ run_tests_group .add_argument (
573
+ "-o" ,
574
+ help = "run the test suite in optimized mode too (implies --test)" ,
575
+ action = "store_const" ,
576
+ const = True ,
577
+ dest = "test_optimized" )
578
+ run_tests_group .add_argument (
579
+ "--test-optimized" ,
580
+ help = "run the test suite in optimized mode too (implies --test)" ,
581
+ metavar = "BOOL" ,
582
+ nargs = '?' ,
583
+ type = argparse_bool ,
584
+ default = False ,
585
+ const = True )
569
586
run_tests_group .add_argument (
570
587
"--long-test" ,
571
588
help = "run the long test suite" ,
@@ -599,14 +616,6 @@ details of the setups of other systems or automated environments.""")
599
616
"Swift runtime" ,
600
617
action = "store_true" )
601
618
602
- parser .add_argument (
603
- "-o" , "--test-optimized" ,
604
- help = "run the test suite in optimized mode too (implies --test)" ,
605
- nargs = '?' ,
606
- type = argparse_bool ,
607
- default = False ,
608
- const = True )
609
-
610
619
run_build_group = parser .add_argument_group (
611
620
title = "Run build" )
612
621
run_build_group .add_argument (
You can’t perform that action at this time.
0 commit comments