Skip to content

Commit 168c844

Browse files
committed
t: cleanup the testing suite
We now test the testing suite properly, with "make check". Also having the listplugins isn't used anymore as it is not part of the program install, but configuration of an eventual package Also, we don't want to require any execution for non test make targets, as it would cause issues with cross compilation. If cross-testing needs to be done, it obviously needs some extensive hand-holding.
1 parent de4daab commit 168c844

25 files changed

+37
-26
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
*.1
44
*~
55
*.bak
6+
*.log
7+
*.trs
68
.deps
79
.dirstamp
810
.gdbinit
@@ -20,3 +22,5 @@ TAGS
2022
/plugins/
2123
/munin-node-c
2224
/munin-plugins-c
25+
/t/p/
26+
!/t/p/*.c

Makefile.am

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,9 @@ ACLOCAL_AMFLAGS = -I m4
1515
SUBDIRS = src/node src/plugins t
1616

1717
dist_doc_DATA = gpl-2.0.txt gpl-3.0.txt
18-
EXTRA_DIST = README.rst getversion
18+
EXTRA_DIST = README.rst getversion t/plugin_list t/node_list
1919

20-
all-local: $(pkglibexec_PROGRAMS)
21-
$(MKDIR_P) plugins
22-
for l in `./src/plugins/munin-plugins-c$(EXEEXT) listplugins`; do \
23-
test -L plugins/$$l$(EXEEXT) || $(LN_S) ../src/plugins/munin-plugins-c$(EXEEXT) plugins/$$l$(EXEEXT); \
24-
done
20+
TESTS = t/plugin_list t/node_list
2521

2622
clean-local:
2723
rm -rf plugins

src/plugins/Makefile.am

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@ munin_plugins_c_SOURCES = \
1515
common.c \
1616
common.h \
1717
plugins.h \
18-
cpu.c \
19-
df.c \
20-
entropy.c \
21-
external_.c \
22-
forks.c \
23-
fw_packets.c \
24-
if_err_.c \
25-
interrupts.c \
26-
iostat.c \
27-
load.c \
28-
open_files.c \
29-
open_inodes.c \
30-
processes.c \
31-
swap.c \
32-
threads.c \
33-
memory.c \
34-
uptime.c \
18+
p/cpu.c \
19+
p/df.c \
20+
p/entropy.c \
21+
p/external_.c \
22+
p/forks.c \
23+
p/fw_packets.c \
24+
p/if_err_.c \
25+
p/interrupts.c \
26+
p/iostat.c \
27+
p/load.c \
28+
p/open_files.c \
29+
p/open_inodes.c \
30+
p/processes.c \
31+
p/swap.c \
32+
p/threads.c \
33+
p/memory.c \
34+
p/uptime.c \
3535
main.c
3636
man_MANS = munin-plugins-c.1
3737
CLEANFILES = $(man_MANS)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

t/Makefile.am

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77

88
include $(top_srcdir)/common.am
99

10-
sbin_PROGRAMS = ok_plugin nb_env
11-
ok_plugin_SOURCES = ok_plugin.c common.c common.h
12-
nb_env_SOURCES = nb_env.c common.c common.h
10+
check_PROGRAMS = p/ok_plugin p/nb_env
11+
p_ok_plugin_SOURCES = p/ok_plugin.c common.c common.h
12+
p_nb_env_SOURCES = p/nb_env.c common.c common.h

t/node_list

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#! /bin/sh
2+
3+
# lauching the list of testing
4+
echo list | src/node/munin-node-c -d t/p -D t.conf
5+
6+
#
7+
echo config nb_env | src/node/munin-node-c -d t/p -D t.conf
8+
echo fetch nb_env | src/node/munin-node-c -d t/p -D t.conf

t/nb_env.c renamed to t/p/nb_env.c

File renamed without changes.
File renamed without changes.

t/plugin_list

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#! /bin/sh
2+
3+
src/plugins/munin-plugins-c listplugins

0 commit comments

Comments
 (0)