Skip to content

Commit 3276854

Browse files
committed
fix parse error in test.py and make -n + -p comma separated
1 parent 439d2e8 commit 3276854

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tools/test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
from tools.targets import TARGET_MAP
3333
from tools.utils import mkdir, ToolException, NotSupportedException
3434
from tools.test_exporters import ReportExporter, ResultExporterType
35-
from utils import argparse_filestring_type, argparse_lowercase_type
35+
from utils import argparse_filestring_type, argparse_lowercase_type, argparse_many
3636

3737
if __name__ == '__main__':
3838
try:
@@ -61,7 +61,7 @@
6161
default=False, help="List (recursively) available tests in order and exit")
6262

6363
parser.add_argument("-p", "--paths", dest="paths",
64-
type=argparse_filestring_type, nargs="*"
64+
type=argparse_many(argparse_filestring_type),
6565
default=None, help="Limit the tests to those within the specified comma separated list of paths")
6666

6767
format_choices = ["list", "json"]
@@ -74,7 +74,8 @@
7474
parser.add_argument("--continue-on-build-fail", action="store_true", dest="continue_on_build_fail",
7575
default=None, help="Continue trying to build all tests if a build failure occurs")
7676

77-
parser.add_argument("-n", "--names", dest="names", nargs="*"
77+
#TODO validate the names instead of just passing through str
78+
parser.add_argument("-n", "--names", dest="names", type=argparse_many(str),
7879
default=None, help="Limit the tests to a comma separated list of names")
7980

8081
parser.add_argument("--test-spec", dest="test_spec",

0 commit comments

Comments
 (0)