mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
build-script: allow combining '-t' and '-T' with other options again
This fixes a regression from PR #2213. We needed a way to disable testing in a preset, even though previous flags already requested tests. So I added an argument to the '--test' and '--validation-test' flags. The argparse module treats '-T' and '--validation-test' the same, so it thinks that in -RTi the 'i' is an argument to '-T'.
This commit is contained in:
@@ -538,15 +538,29 @@ details of the setups of other systems or automated environments.""")
|
||||
run_tests_group = parser.add_argument_group(
|
||||
title="Run tests")
|
||||
run_tests_group.add_argument(
|
||||
"-t", "--test",
|
||||
"-t",
|
||||
help="test Swift after building",
|
||||
action="store_const",
|
||||
const=True,
|
||||
dest="test")
|
||||
run_tests_group.add_argument(
|
||||
"--test",
|
||||
help="test Swift after building",
|
||||
metavar="BOOL",
|
||||
nargs='?',
|
||||
type=argparse_bool,
|
||||
default=False,
|
||||
const=True)
|
||||
run_tests_group.add_argument(
|
||||
"-T", "--validation-test",
|
||||
"-T",
|
||||
help="run the validation test suite (implies --test)",
|
||||
action="store_const",
|
||||
const=True,
|
||||
dest="validation_test")
|
||||
run_tests_group.add_argument(
|
||||
"--validation-test",
|
||||
help="run the validation test suite (implies --test)",
|
||||
metavar="BOOL",
|
||||
nargs='?',
|
||||
type=argparse_bool,
|
||||
default=False,
|
||||
|
||||
Reference in New Issue
Block a user