From f71d5281ceddf67cdbbc88d8605bc3e9c24136ef Mon Sep 17 00:00:00 2001 From: Christian Hopps Date: Thu, 16 Jan 2025 01:07:53 +0000 Subject: [PATCH] tests: dont run ldp snmp test if no snmp Signed-off-by: Christian Hopps --- tests/topotests/ldp_snmp/test_ldp_snmp_topo1.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/topotests/ldp_snmp/test_ldp_snmp_topo1.py b/tests/topotests/ldp_snmp/test_ldp_snmp_topo1.py index ea404beae4..db2657e523 100644 --- a/tests/topotests/ldp_snmp/test_ldp_snmp_topo1.py +++ b/tests/topotests/ldp_snmp/test_ldp_snmp_topo1.py @@ -107,6 +107,11 @@ def build_topo(tgen): def setup_module(mod): "Sets up the pytest environment" + + if not os.path.isfile("/usr/sbin/snmpd"): + error_msg = "SNMP not installed - skipping" + pytest.skip(error_msg) + tgen = Topogen(build_topo, mod.__name__) tgen.start_topology() -- 2.39.5