diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-09-08 15:57:06 +0200 |
|---|---|---|
| committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-09-08 15:57:06 +0200 |
| commit | 87195f5511bf18db2a64f71ea9783ebbfb33c3a5 (patch) | |
| tree | 491157b89647d73ed6acb0e4e2ae7cdf7fffb01c /plugins/Makefile.am | |
| parent | 1aefb1f9df5268ccbcd3ce38f5527ebca3896db6 (diff) | |
| download | monitoring-plugins-87195f5511bf18db2a64f71ea9783ebbfb33c3a5.tar.gz | |
check_snmp: refactoring + fixes
This commit moves the state retention logic to check_snmp as it is only
used there and I do not want it to be used at all, so it doesn't get a
place in the lib.
Otherwise this adapts tests and fixes the rate computing in the
refactored version of check_snmp.
Also fixes some bugs detected with the tests
Diffstat (limited to 'plugins/Makefile.am')
| -rw-r--r-- | plugins/Makefile.am | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/Makefile.am b/plugins/Makefile.am index f2f1777f..deae938d 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am | |||
| @@ -13,8 +13,14 @@ AM_CFLAGS = -DNP_VERSION='"$(NP_VERSION)"' | |||
| 13 | 13 | ||
| 14 | VPATH = $(top_srcdir) $(top_srcdir)/lib $(top_srcdir)/plugins $(top_srcdir)/plugins/t | 14 | VPATH = $(top_srcdir) $(top_srcdir)/lib $(top_srcdir)/plugins $(top_srcdir)/plugins/t |
| 15 | 15 | ||
| 16 | AM_CPPFLAGS = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_srcdir)/intl \ | 16 | AM_CPPFLAGS = -I.. \ |
| 17 | @LDAPINCLUDE@ @PGINCLUDE@ @SSLINCLUDE@ | 17 | -I$(top_srcdir)/lib \ |
| 18 | -I$(top_srcdir)/gl \ | ||
| 19 | -I$(top_srcdir)/intl \ | ||
| 20 | -DNP_STATE_DIR_PREFIX=\"$(localstatedir)\" \ | ||
| 21 | @LDAPINCLUDE@ \ | ||
| 22 | @PGINCLUDE@ \ | ||
| 23 | @SSLINCLUDE@ | ||
| 18 | 24 | ||
| 19 | localedir = $(datadir)/locale | 25 | localedir = $(datadir)/locale |
| 20 | # gettext docs say to use AM_CPPFLAGS, but per module_CPPFLAGS override this | 26 | # gettext docs say to use AM_CPPFLAGS, but per module_CPPFLAGS override this |
| @@ -42,11 +48,13 @@ EXTRA_PROGRAMS = check_mysql check_radius check_pgsql check_hpjd \ | |||
| 42 | check_procs check_mysql_query check_apt check_dbi check_curl \ | 48 | check_procs check_mysql_query check_apt check_dbi check_curl \ |
| 43 | \ | 49 | \ |
| 44 | tests/test_check_swap \ | 50 | tests/test_check_swap \ |
| 51 | tests/test_check_snmp \ | ||
| 45 | tests/test_check_disk | 52 | tests/test_check_disk |
| 46 | 53 | ||
| 47 | SUBDIRS = picohttpparser | 54 | SUBDIRS = picohttpparser |
| 48 | 55 | ||
| 49 | np_test_scripts = tests/test_check_swap.t \ | 56 | np_test_scripts = tests/test_check_swap.t \ |
| 57 | tests/test_check_snmp.t \ | ||
| 50 | tests/test_check_disk.t | 58 | tests/test_check_disk.t |
| 51 | 59 | ||
| 52 | EXTRA_DIST = t \ | 60 | EXTRA_DIST = t \ |
| @@ -178,6 +186,8 @@ endif | |||
| 178 | 186 | ||
| 179 | tests_test_check_swap_LDADD = $(BASEOBJS) $(tap_ldflags) -ltap | 187 | tests_test_check_swap_LDADD = $(BASEOBJS) $(tap_ldflags) -ltap |
| 180 | tests_test_check_swap_SOURCES = tests/test_check_swap.c check_swap.d/swap.c | 188 | tests_test_check_swap_SOURCES = tests/test_check_swap.c check_swap.d/swap.c |
| 189 | tests_test_check_snmp_LDADD = $(BASEOBJS) $(tap_ldflags) -ltap | ||
| 190 | tests_test_check_snmp_SOURCES = tests/test_check_snmp.c check_snmp.d/check_snmp_helpers.c | ||
| 181 | tests_test_check_disk_LDADD = $(BASEOBJS) $(tap_ldflags) check_disk.d/utils_disk.c -ltap | 191 | tests_test_check_disk_LDADD = $(BASEOBJS) $(tap_ldflags) check_disk.d/utils_disk.c -ltap |
| 182 | tests_test_check_disk_SOURCES = tests/test_check_disk.c | 192 | tests_test_check_disk_SOURCES = tests/test_check_disk.c |
| 183 | 193 | ||
