summaryrefslogtreecommitdiffstats
path: root/plugins/Makefile.am
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-12-19 11:28:35 +0100
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-12-20 10:02:47 +0100
commit6fcbbaafc4bae79d4e674a2cf7f1d87d5a471603 (patch)
treebcce5da6a2b96b7f288d948db0584fe8420ce824 /plugins/Makefile.am
parent2dec5182c508bd3cc286b4649836ead51aec50ef (diff)
downloadmonitoring-plugins-6fcbbaafc4bae79d4e674a2cf7f1d87d5a471603.tar.gz
Implement first unit test for check_swap
Diffstat (limited to 'plugins/Makefile.am')
-rw-r--r--plugins/Makefile.am19
1 files changed, 16 insertions, 3 deletions
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 1ca7cf3f..8ef2a246 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -38,19 +38,27 @@ check_tcp_programs = check_ftp check_imap check_nntp check_pop \
38EXTRA_PROGRAMS = check_mysql check_radius check_pgsql check_snmp check_hpjd \ 38EXTRA_PROGRAMS = check_mysql check_radius check_pgsql check_snmp check_hpjd \
39 check_swap check_fping check_ldap check_game check_dig \ 39 check_swap check_fping check_ldap check_game check_dig \
40 check_nagios check_by_ssh check_dns check_nt check_ide_smart \ 40 check_nagios check_by_ssh check_dns check_nt check_ide_smart \
41 check_procs check_mysql_query check_apt check_dbi check_curl 41 check_procs check_mysql_query check_apt check_dbi check_curl \
42 \
43 tests/test_check_swap
42 44
43SUBDIRS = picohttpparser 45SUBDIRS = picohttpparser
44 46
45EXTRA_DIST = t tests 47np_test_scripts = tests/test_check_swap.t
48
49EXTRA_DIST = t tests $(np_test_scripts)
46 50
47PLUGINHDRS = common.h 51PLUGINHDRS = common.h
48 52
49noinst_LIBRARIES = libnpcommon.a 53noinst_LIBRARIES = libnpcommon.a
54noinst_PROGRAMS = @EXTRA_PLUGIN_TESTS@
55# These two lines support "make check", but we use "make test"
56check_PROGRAMS = @EXTRA_PLUGIN_TESTS@
50 57
51libnpcommon_a_SOURCES = utils.c netutils.c sslutils.c runcmd.c \ 58libnpcommon_a_SOURCES = utils.c netutils.c sslutils.c runcmd.c \
52 popen.c utils.h netutils.h popen.h common.h runcmd.c runcmd.h 59 popen.c utils.h netutils.h popen.h common.h runcmd.c runcmd.h
53 60
61
54BASEOBJS = libnpcommon.a ../lib/libmonitoringplug.a ../gl/libgnu.a $(LIB_CRYPTO) 62BASEOBJS = libnpcommon.a ../lib/libmonitoringplug.a ../gl/libgnu.a $(LIB_CRYPTO)
55NETOBJS = $(BASEOBJS) $(EXTRA_NETOBLS) 63NETOBJS = $(BASEOBJS) $(EXTRA_NETOBLS)
56NETLIBS = $(NETOBJS) $(SOCKETLIBS) 64NETLIBS = $(NETOBJS) $(SOCKETLIBS)
@@ -58,7 +66,10 @@ SSLOBJS = $(BASEOBJS) $(NETLIBS) $(SSLLIBS) $(LIB_CRYPTO)
58 66
59TESTS_ENVIRONMENT = perl -I $(top_builddir) -I $(top_srcdir) 67TESTS_ENVIRONMENT = perl -I $(top_builddir) -I $(top_srcdir)
60 68
61TESTS = @PLUGIN_TEST@ 69tap_ldflags = -L$(top_srcdir)/tap
70
71TESTS = @PLUGIN_TEST@ @EXTRA_PLUGIN_TESTS@
72
62 73
63test: 74test:
64 perl -I $(top_builddir) -I $(top_srcdir) ../test.pl 75 perl -I $(top_builddir) -I $(top_srcdir) ../test.pl
@@ -122,6 +133,8 @@ if !HAVE_UTMPX
122check_users_LDADD += popen.o 133check_users_LDADD += popen.o
123endif 134endif
124 135
136tests_test_check_swap_LDADD = $(BASEOBJS) check_swap.d/swap.o $(tap_ldflags) -ltap
137
125############################################################################## 138##############################################################################
126# secondary dependencies 139# secondary dependencies
127 140