New upstream version 1.2.3
[quagga-debian.git] / tests / Makefile.am
1
2 EXTRA_DIST = \
3         testcommands.in \
4         testcommands.refout \
5         testcli.in \
6         testcli.refout
7
8 AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib
9 DEFS = @DEFS@ $(LOCAL_OPTS) -DSYSCONFDIR=\"$(sysconfdir)/\"
10
11 if BGPD
12 TESTS_BGPD = aspathtest testbgpcap ecommtest testbgpmpattr testbgpmpath
13 else
14 TESTS_BGPD =
15 endif
16
17 check_PROGRAMS = testsig testsegv testbuffer testmemory heavy heavywq heavythread \
18                 testprivs teststream testchecksum tabletest testnexthopiter \
19                 testcommands test-timer-correctness test-timer-performance \
20                 testcli \
21                 $(TESTS_BGPD)
22
23 TESTS = $(TESTS_BGPD) teststream tabletest testmemory testnexthopiter \
24         test-timer-correctness tabletest
25
26
27 ../vtysh/vtysh_cmd.c:
28         $(MAKE) -C ../vtysh vtysh_cmd.c
29
30 test-commands-defun.c: ../vtysh/vtysh_cmd.c
31         sed \
32                 -e 's/"vtysh\.h"/"tests.h"/' \
33                 -e 's/vtysh_init_cmd/test_init_cmd/' \
34                 -e 's/VTYSH_[A-Z][A-Z_0-9]*/0/g' \
35                 < ../vtysh/vtysh_cmd.c \
36                 > test-commands-defun.c
37
38 BUILT_SOURCES = test-commands-defun.c
39 CLEANFILES = test-commands-defun.c bgpd libzebra
40
41 noinst_HEADERS = prng.h tests.h common-cli.h
42
43 testcli_SOURCES = test-cli.c common-cli.c
44 testsig_SOURCES = test-sig.c
45 testsegv_SOURCES = test-segv.c
46 testbuffer_SOURCES = test-buffer.c
47 testmemory_SOURCES = test-memory.c
48 testprivs_SOURCES = test-privs.c
49 teststream_SOURCES = test-stream.c
50 heavy_SOURCES = heavy.c main.c
51 heavywq_SOURCES = heavy-wq.c main.c
52 heavythread_SOURCES = heavy-thread.c main.c
53 aspathtest_SOURCES = aspath_test.c
54 testbgpcap_SOURCES = bgp_capability_test.c
55 ecommtest_SOURCES = ecommunity_test.c
56 testbgpmpattr_SOURCES =  bgp_mp_attr_test.c
57 testchecksum_SOURCES = test-checksum.c
58 testbgpmpath_SOURCES = bgp_mpath_test.c
59 tabletest_SOURCES = table_test.c
60 testnexthopiter_SOURCES = test-nexthop-iter.c prng.c
61 testcommands_SOURCES = test-commands-defun.c test-commands.c prng.c
62 test_timer_correctness_SOURCES = test-timer-correctness.c prng.c
63 test_timer_performance_SOURCES = test-timer-performance.c prng.c
64
65 testcli_LDADD = ../lib/libzebra.la @LIBCAP@
66 testsig_LDADD = ../lib/libzebra.la @LIBCAP@
67 testsegv_LDADD = ../lib/libzebra.la @LIBCAP@
68 testbuffer_LDADD = ../lib/libzebra.la @LIBCAP@
69 testmemory_LDADD = ../lib/libzebra.la @LIBCAP@
70 testprivs_LDADD = ../lib/libzebra.la @LIBCAP@
71 teststream_LDADD = ../lib/libzebra.la @LIBCAP@
72 heavy_LDADD = ../lib/libzebra.la @LIBCAP@ -lm
73 heavywq_LDADD = ../lib/libzebra.la @LIBCAP@ -lm
74 heavythread_LDADD = ../lib/libzebra.la @LIBCAP@ -lm
75 aspathtest_LDADD = ../bgpd/libbgp.a ../lib/libzebra.la @LIBCAP@ -lm
76 testbgpcap_LDADD = ../bgpd/libbgp.a ../lib/libzebra.la @LIBCAP@ -lm
77 ecommtest_LDADD = ../bgpd/libbgp.a ../lib/libzebra.la @LIBCAP@ -lm
78 testbgpmpattr_LDADD = ../bgpd/libbgp.a ../lib/libzebra.la @LIBCAP@ -lm
79 testchecksum_LDADD = ../lib/libzebra.la @LIBCAP@ 
80 testbgpmpath_LDADD = ../bgpd/libbgp.a ../lib/libzebra.la @LIBCAP@ -lm
81 tabletest_LDADD = ../lib/libzebra.la @LIBCAP@ -lm
82 testnexthopiter_LDADD = ../lib/libzebra.la @LIBCAP@
83 testcommands_LDADD = ../lib/libzebra.la @LIBCAP@
84 test_timer_correctness_LDADD = ../lib/libzebra.la @LIBCAP@
85 test_timer_performance_LDADD = ../lib/libzebra.la @LIBCAP@