Skip to content

Commit 7b94982

Browse files
RaisinTentargos
authored andcommitted
tools: allow selecting test subsystems with numbers in their names
Previously, selecting subsystems with numbers in their names, like http2, weren't matched due to a restrictive regex: ``` $ tools/test.py http2 No tests to run. ``` The regex now allows digits, so these tests run as expected: ``` $ tools/test.py http2 [00:17|% 100|+ 286|- 0]: Done All tests passed. ``` Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: #59242 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
1 parent 6a47ff4 commit 7b94982

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1605,7 +1605,7 @@ def ArgsToTestPaths(test_root, args, suites):
16051605
if len(args) == 0 or 'default' in args:
16061606
def_suites = [s for s in suites if s not in IGNORED_SUITES]
16071607
args = [a for a in args if a != 'default'] + def_suites
1608-
subsystem_regex = re.compile(r'^[a-zA-Z-]*$')
1608+
subsystem_regex = re.compile(r'^[a-zA-Z0-9-]*$')
16091609
check = lambda arg: subsystem_regex.match(arg) and (arg not in suites)
16101610
mapped_args = ["*/test*-%s-*" % arg if check(arg) else arg for arg in args]
16111611
paths = [SplitPath(NormalizePath(a)) for a in mapped_args]

0 commit comments

Comments
 (0)