summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Nierlein <Sven.Nierlein@consol.de>2014-07-31 15:06:32 (GMT)
committerSven Nierlein <Sven.Nierlein@consol.de>2014-07-31 19:07:18 (GMT)
commita5b6d94fc6daa1868745441f6fed8f7576f2e5dd (patch)
tree9ce424b0ba1237cc9f10c7c086c3ff34ba0179de
parent8e8d2d42433a97a6b5a09b01cdd4cfbfc5807cbe (diff)
downloadmonitoring-plugins-a5b6d94fc6daa1868745441f6fed8f7576f2e5dd.tar.gz
tests: skip extented snmp tests if snmpd has no perl support
solaris snmpd has no perl support by default, so this test will fail. Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
-rwxr-xr-xplugins/tests/check_snmp.t11
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins/tests/check_snmp.t b/plugins/tests/check_snmp.t
index aace9bc..2fd033d 100755
--- a/plugins/tests/check_snmp.t
+++ b/plugins/tests/check_snmp.t
@@ -20,7 +20,16 @@ if ($@) {
20 plan skip_all => "Missing required module for test: $@"; 20 plan skip_all => "Missing required module for test: $@";
21} else { 21} else {
22 if (-x "./check_snmp") { 22 if (-x "./check_snmp") {
23 plan tests => $tests; 23 # check if snmpd has perl support
24 my $test = `snmpd -c tests/conf/snmpd.conf -C -r -H 2>&1`;
25 if(!defined $test) {
26 plan skip_all => "snmpd required";
27 }
28 elsif($test =~ m/Warning: Unknown token: perl/) {
29 plan skip_all => "snmpd has no perl support";
30 } else {
31 plan tests => $tests;
32 }
24 } else { 33 } else {
25 plan skip_all => "No check_snmp compiled"; 34 plan skip_all => "No check_snmp compiled";
26 } 35 }