4 unless(grep /blib/, @INC) {
6 @INC = '../lib' if -d '../lib';
10 # This merely checks to see if the default_store routines work from
11 # read configuration files. Functionally, if this fails then it's a
12 # serious problem because they linked with static libraries instead of
13 # shared ones as the memory space is different.
16 BEGIN {plan tests => 3}
18 $ENV{'SNMPCONFPATH'} = ".:t";
20 ok(1); # just start up
23 use NetSNMP::default_store(':all');
25 # should be 0, as it's un-initialized
26 $myint = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID,
27 NETSNMP_DS_LIB_NUMERIC_TIMETICKS);
31 SNMP::init_snmp("conftest");
33 $myint = netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID,
34 NETSNMP_DS_LIB_NUMERIC_TIMETICKS);
36 # ok, should be 1 as it's initalized by the snmp.conf config file.
39 # this is a pretty major error, so if it's not true we really really
40 # print a big big warning. Technically, I suspect this is a bad thing
41 # to do in perl tests but...
43 die "\n\n\n" . "*" x 75 . "\nBIG PROBLEM: I wasn't able to read
44 data from a configuration file. This likely means that you've
45 complied th net-snmp package with static libraries, which can
46 cause real problems with the perl module. Please reconfigure your
47 net-snmp package for use with shared libraries (run configure with
48 --enable-shared)\n" . "*" x 75 . "\n\n\n\n";