From b9f3e47f3a4010d8ea3179db7e6b602a40e349cb Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 14 Jan 2021 20:29:14 -0500 Subject: tests: Start the ability to mark tests Add the ability for our topotests to take advantage of pytest `mark`ing. This effectively allows you to tell pytest to run against certain sets of tests. For a demonstration purpose I've added in marks for: babel eigrp ldp ospf pim rip And setup tests to run against those tests that only test those protocols. You can run against eigrp tests by running `pytest -k eigrp` Other combinations are also available based upon simple boolean logic. Just read the pytest.mark documentation. Signed-off-by: Donald Sharp --- tests/topotests/pytest.ini | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/topotests/pytest.ini') diff --git a/tests/topotests/pytest.ini b/tests/topotests/pytest.ini index 6e8e749092..fcbf853fac 100644 --- a/tests/topotests/pytest.ini +++ b/tests/topotests/pytest.ini @@ -1,6 +1,13 @@ # Skip pytests example directory [pytest] norecursedirs = .git example-test example-topojson-test lib docker +markers = + babel: Tests that run against BABEL + eigrp: Tests that run against EIGRPD + ldp: Tests that run against LDPD + ospf: Tests that run against OSPF( v2 and v3 ) + pim: Tests that run against pim + rip: Tests that run against RIP, both v4 and v6 [topogen] # Default configuration values -- cgit v1.2.3