diff options
Diffstat (limited to 'plugins/Makefile.am')
-rw-r--r-- | plugins/Makefile.am | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 49086b7a..d43c1971 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am | |||
@@ -38,19 +38,27 @@ check_tcp_programs = check_ftp check_imap check_nntp check_pop \ | |||
38 | EXTRA_PROGRAMS = check_mysql check_radius check_pgsql check_snmp check_hpjd \ | 38 | EXTRA_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 | ||
43 | SUBDIRS = picohttpparser | 45 | SUBDIRS = picohttpparser |
44 | 46 | ||
45 | EXTRA_DIST = t tests | 47 | np_test_scripts = tests/test_check_swap.t |
48 | |||
49 | EXTRA_DIST = t tests $(np_test_scripts) check_swap.d | ||
46 | 50 | ||
47 | PLUGINHDRS = common.h | 51 | PLUGINHDRS = common.h |
48 | 52 | ||
49 | noinst_LIBRARIES = libnpcommon.a | 53 | noinst_LIBRARIES = libnpcommon.a |
54 | noinst_PROGRAMS = @EXTRA_PLUGIN_TESTS@ | ||
55 | # These two lines support "make check", but we use "make test" | ||
56 | check_PROGRAMS = @EXTRA_PLUGIN_TESTS@ | ||
50 | 57 | ||
51 | libnpcommon_a_SOURCES = utils.c netutils.c sslutils.c runcmd.c \ | 58 | libnpcommon_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 | |||
54 | BASEOBJS = libnpcommon.a ../lib/libmonitoringplug.a ../gl/libgnu.a $(LIB_CRYPTO) | 62 | BASEOBJS = libnpcommon.a ../lib/libmonitoringplug.a ../gl/libgnu.a $(LIB_CRYPTO) |
55 | NETOBJS = $(BASEOBJS) $(EXTRA_NETOBLS) | 63 | NETOBJS = $(BASEOBJS) $(EXTRA_NETOBLS) |
56 | NETLIBS = $(NETOBJS) $(SOCKETLIBS) | 64 | NETLIBS = $(NETOBJS) $(SOCKETLIBS) |
@@ -58,7 +66,10 @@ SSLOBJS = $(BASEOBJS) $(NETLIBS) $(SSLLIBS) $(LIB_CRYPTO) | |||
58 | 66 | ||
59 | TESTS_ENVIRONMENT = perl -I $(top_builddir) -I $(top_srcdir) | 67 | TESTS_ENVIRONMENT = perl -I $(top_builddir) -I $(top_srcdir) |
60 | 68 | ||
61 | TESTS = @PLUGIN_TEST@ | 69 | tap_ldflags = -L$(top_srcdir)/tap |
70 | |||
71 | TESTS = @PLUGIN_TEST@ @EXTRA_PLUGIN_TESTS@ | ||
72 | |||
62 | 73 | ||
63 | test: | 74 | test: |
64 | perl -I $(top_builddir) -I $(top_srcdir) ../test.pl | 75 | perl -I $(top_builddir) -I $(top_srcdir) ../test.pl |
@@ -107,6 +118,7 @@ check_real_LDADD = $(NETLIBS) | |||
107 | check_snmp_LDADD = $(BASEOBJS) | 118 | check_snmp_LDADD = $(BASEOBJS) |
108 | check_smtp_LDADD = $(SSLOBJS) | 119 | check_smtp_LDADD = $(SSLOBJS) |
109 | check_ssh_LDADD = $(NETLIBS) | 120 | check_ssh_LDADD = $(NETLIBS) |
121 | check_swap_SOURCES = check_swap.c check_swap.d/swap.c | ||
110 | check_swap_LDADD = $(MATHLIBS) $(BASEOBJS) | 122 | check_swap_LDADD = $(MATHLIBS) $(BASEOBJS) |
111 | check_tcp_LDADD = $(SSLOBJS) | 123 | check_tcp_LDADD = $(SSLOBJS) |
112 | check_time_LDADD = $(NETLIBS) | 124 | check_time_LDADD = $(NETLIBS) |
@@ -122,6 +134,9 @@ if !HAVE_UTMPX | |||
122 | check_users_LDADD += popen.o | 134 | check_users_LDADD += popen.o |
123 | endif | 135 | endif |
124 | 136 | ||
137 | tests_test_check_swap_LDADD = $(BASEOBJS) $(tap_ldflags) -ltap | ||
138 | tests_test_check_swap_SOURCES = tests/test_check_swap.c check_swap.d/swap.c | ||
139 | |||
125 | ############################################################################## | 140 | ############################################################################## |
126 | # secondary dependencies | 141 | # secondary dependencies |
127 | 142 | ||