mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 05:38:47 +02:00
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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
e55e0a7a98
commit
cde8f275ad
1 changed files with 1 additions and 1 deletions
|
@ -1605,7 +1605,7 @@ def ArgsToTestPaths(test_root, args, suites):
|
|||
if len(args) == 0 or 'default' in args:
|
||||
def_suites = [s for s in suites if s not in IGNORED_SUITES]
|
||||
args = [a for a in args if a != 'default'] + def_suites
|
||||
subsystem_regex = re.compile(r'^[a-zA-Z-]*$')
|
||||
subsystem_regex = re.compile(r'^[a-zA-Z0-9-]*$')
|
||||
check = lambda arg: subsystem_regex.match(arg) and (arg not in suites)
|
||||
mapped_args = ["*/test*-%s-*" % arg if check(arg) else arg for arg in args]
|
||||
paths = [SplitPath(NormalizePath(a)) for a in mapped_args]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue