diff --git a/test/config.sh.in b/test/config.sh.in index 6823eff3..391e08c2 100755 --- a/test/config.sh.in +++ b/test/config.sh.in @@ -52,6 +52,9 @@ HAVE_HTTP1=@HAVE_HTTP1@ # use it you need to set Clixon config option CLICON_YANG_REGEXP to libxml2 WITH_LIBXML2=@with_libxml2@ +# Check if we have support for Net-SNMP enabled or not. +WITH_NETSNMP=@enable_netsnmp@ + # C++ compiler CXX=@CXX@ diff --git a/test/test_snmp.sh b/test/test_snmp.sh index 2525fb55..793cba63 100755 --- a/test/test_snmp.sh +++ b/test/test_snmp.sh @@ -11,6 +11,11 @@ if [ $valgrindtest -ne 0 ]; then return 0 # skip fi +if [ ${WITH_NETSNMP} != "yes" ]; then + echo "Skipping test, Net-SNMP support not enabled." + if [ "$s" = $0 ]; then exit 0; else return 0; fi +fi + snmpd=$(type -p snmpd) snmpget="$(type -p snmpget) -c public -v2c localhost:1161 " snmpset="$(type -p snmpset) -c public -v2c localhost:1161 "