aboutsummaryrefslogtreecommitdiffstats
path: root/test/config.py
diff options
context:
space:
mode:
authorKlement Sekera <klement.sekera@gmail.com>2023-04-14 17:44:04 +0200
committerDave Wallace <dwallacelf@gmail.com>2023-04-25 15:44:13 +0000
commit08c50e3b7acb932adb1f62002619a1e52207262a (patch)
treec4c7583aef67c1dde62d2423f99f8fed562d5d11 /test/config.py
parent39d7699c205bb243af12a2d32913e9a9af51b173 (diff)
tests: support multiple filter expressions
Support multiple comma-delimited filter expressions, e.g. to run both bfd and ip4 tests, it's now possible to do: make test TEST=bfd,ip4 Same goes for wildcards, e.g.: make test TEST=bfd,..test_longest_prefix_match,..test_icmp_error Type: improvement Change-Id: I0cceaa443cb612dca955f301c7407959f9a71a6e Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Diffstat (limited to 'test/config.py')
-rw-r--r--test/config.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/config.py b/test/config.py
index d2f14c82e19..578cc40fa2a 100644
--- a/test/config.py
+++ b/test/config.py
@@ -122,7 +122,8 @@ parser.add_argument(
)
filter_help_string = """\
-expression consists of 3 string selectors separated by '.' separators:
+expression consists of one or more filters separated by commas (',')
+filter consists of 3 string selectors separated by dots ('.')
<file>.<class>.<function>
@@ -142,6 +143,8 @@ examples:
test_add_bfd from test_bfd.py/BFDAPITestCase
4. '.*.test_add_bfd' selects all test functions named test_add_bfd
from all files/classes
+5. 'bfd,ip4,..test_icmp_error' selects all test functions in test_bfd.py,
+ test_ip4.py and all test functions named 'test_icmp_error' in all files
"""
parser.add_argument(
"--filter", action="store", metavar="FILTER_EXPRESSION", help=filter_help_string