Skip to content

Commit e331bb1

Browse files
committed
[build-script] Applied a22d856 fix to -o, --test-optimized
Also, moved to run_tests_group group.
1 parent a14a836 commit e331bb1

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

utils/build-script

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,9 @@ details of the setups of other systems or automated environments.""")
538538

539539
run_tests_group = parser.add_argument_group(
540540
title="Run tests")
541+
542+
# NOTE: We can't merge -t and --test, because nargs='?' makes
543+
# `-ti` to be treated as `-t=i`.
541544
run_tests_group.add_argument(
542545
"-t",
543546
help="test Swift after building",
@@ -566,6 +569,20 @@ details of the setups of other systems or automated environments.""")
566569
type=argparse_bool,
567570
default=False,
568571
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)
569586
run_tests_group.add_argument(
570587
"--long-test",
571588
help="run the long test suite",
@@ -599,14 +616,6 @@ details of the setups of other systems or automated environments.""")
599616
"Swift runtime",
600617
action="store_true")
601618

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-
610619
run_build_group = parser.add_argument_group(
611620
title="Run build")
612621
run_build_group.add_argument(

0 commit comments

Comments
 (0)