mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-06-13 18:50:01 -04:00
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>
This commit is contained in:
parent
8e8d2d4243
commit
a5b6d94fc6
1 changed files with 10 additions and 1 deletions
|
|
@ -20,7 +20,16 @@ if ($@) {
|
|||
plan skip_all => "Missing required module for test: $@";
|
||||
} else {
|
||||
if (-x "./check_snmp") {
|
||||
plan tests => $tests;
|
||||
# check if snmpd has perl support
|
||||
my $test = `snmpd -c tests/conf/snmpd.conf -C -r -H 2>&1`;
|
||||
if(!defined $test) {
|
||||
plan skip_all => "snmpd required";
|
||||
}
|
||||
elsif($test =~ m/Warning: Unknown token: perl/) {
|
||||
plan skip_all => "snmpd has no perl support";
|
||||
} else {
|
||||
plan tests => $tests;
|
||||
}
|
||||
} else {
|
||||
plan skip_all => "No check_snmp compiled";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue