blob: 6dfab5371a32ee521c910adeca5df1554ab9924d [file] [log] [blame]
David Lamparterf281ab92013-02-26 16:21:20 +01001AUTOMAKE_OPTIONS = dejagnu
David Lamparterc69905b2013-01-24 01:39:14 +01002DEJATOOL = libzebra
David Lamparterf281ab92013-02-26 16:21:20 +01003
David Lamparterc69905b2013-01-24 01:39:14 +01004SUBDIRS = \
5 bgpd.tests \
6 libzebra.tests
David Lamparterf281ab92013-02-26 16:21:20 +01007
8EXTRA_DIST = \
9 config/unix.exp \
David Lamparter5bb7e4d2013-02-26 17:53:30 +010010 lib/bgpd.exp \
David Lamparterc69905b2013-01-24 01:39:14 +010011 lib/libzebra.exp \
Christian Franke8f399b02013-09-30 12:27:50 +000012 global-conf.exp \
13 testcommands.in \
David Lamparterd79668f2015-05-14 14:47:05 +020014 testcommands.refout \
15 testcli.in \
16 testcli.refout
David Lamparterf281ab92013-02-26 16:21:20 +010017
David Lamparter237aac52014-06-28 22:23:10 +020018AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib
paul41c14a12004-07-26 19:27:51 +000019DEFS = @DEFS@ $(LOCAL_OPTS) -DSYSCONFDIR=\"$(sysconfdir)/\"
20
Paul P Komkoff Jr46bc0e42008-08-13 16:17:04 +010021AM_CFLAGS = $(PICFLAGS)
22AM_LDFLAGS = $(PILDFLAGS)
23
David Lamparterc0951852013-02-23 22:17:21 +010024if BGPD
25TESTS_BGPD = aspathtest testbgpcap ecommtest testbgpmpattr testbgpmpath
David Lamparter5bb7e4d2013-02-26 17:53:30 +010026DEJATOOL += bgpd
David Lamparterc0951852013-02-23 22:17:21 +010027else
28TESTS_BGPD =
29endif
30
David Lamparter4d474fa2013-11-19 15:00:06 +010031check_PROGRAMS = testsig testsegv testbuffer testmemory heavy heavywq heavythread \
Christian Frankefa713d92013-07-05 15:35:37 +000032 testprivs teststream testchecksum tabletest testnexthopiter \
Christian Frankeba32db12013-11-19 14:11:40 +000033 testcommands test-timer-correctness test-timer-performance \
David Lamparterdb93eec2015-05-05 11:04:59 +020034 testcli \
David Lamparterc0951852013-02-23 22:17:21 +010035 $(TESTS_BGPD)
Paul Jakma343f7202008-06-07 20:32:38 +000036
Christian Franke8f399b02013-09-30 12:27:50 +000037../vtysh/vtysh_cmd.c:
38 $(MAKE) -C ../vtysh vtysh_cmd.c
39
40test-commands-defun.c: ../vtysh/vtysh_cmd.c
41 sed \
David Lamparterc3138952015-04-21 10:02:23 +020042 -e 's/"vtysh\.h"/"tests.h"/' \
Christian Franke8f399b02013-09-30 12:27:50 +000043 -e 's/vtysh_init_cmd/test_init_cmd/' \
44 -e 's/VTYSH_[A-Z][A-Z_0-9]*/0/g' \
45 < ../vtysh/vtysh_cmd.c \
46 > test-commands-defun.c
47
David Lampartere712d0e2014-04-01 19:34:55 +020048BUILT_SOURCES = test-commands-defun.c
David Lamparterdb93eec2015-05-05 11:04:59 +020049noinst_HEADERS = prng.h tests.h common-cli.h
David Lampartera83a1e92013-10-22 11:35:48 -070050
David Lamparterdb93eec2015-05-05 11:04:59 +020051testcli_SOURCES = test-cli.c common-cli.c
paul41c14a12004-07-26 19:27:51 +000052testsig_SOURCES = test-sig.c
David Lamparter4d474fa2013-11-19 15:00:06 +010053testsegv_SOURCES = test-segv.c
paul4dcadf72005-04-13 03:31:35 +000054testbuffer_SOURCES = test-buffer.c
55testmemory_SOURCES = test-memory.c
paul84771ee2005-10-11 03:48:28 +000056testprivs_SOURCES = test-privs.c
paul067fca82006-01-10 14:49:04 +000057teststream_SOURCES = test-stream.c
paul9f3f7a12005-04-25 16:42:24 +000058heavy_SOURCES = heavy.c main.c
59heavywq_SOURCES = heavy-wq.c main.c
60heavythread_SOURCES = heavy-thread.c main.c
paul1f377b02005-09-10 18:00:11 +000061aspathtest_SOURCES = aspath_test.c
Paul Jakma6d582722007-08-06 15:21:45 +000062testbgpcap_SOURCES = bgp_capability_test.c
Paul Jakma0b2aa3a2007-10-14 22:32:21 +000063ecommtest_SOURCES = ecommunity_test.c
Paul Jakma343f7202008-06-07 20:32:38 +000064testbgpmpattr_SOURCES = bgp_mp_attr_test.c
Paul Jakma5d4b8cf2008-11-16 18:34:19 +000065testchecksum_SOURCES = test-checksum.c
Josh Bailey42ea6852011-07-20 20:44:23 -070066testbgpmpath_SOURCES = bgp_mpath_test.c
Avneesh Sachdev28971c82012-08-17 08:19:50 -070067tabletest_SOURCES = table_test.c
Christian Frankefa713d92013-07-05 15:35:37 +000068testnexthopiter_SOURCES = test-nexthop-iter.c prng.c
Christian Franke8f399b02013-09-30 12:27:50 +000069testcommands_SOURCES = test-commands-defun.c test-commands.c prng.c
Christian Frankeba32db12013-11-19 14:11:40 +000070test_timer_correctness_SOURCES = test-timer-correctness.c prng.c
71test_timer_performance_SOURCES = test-timer-performance.c prng.c
paul41c14a12004-07-26 19:27:51 +000072
David Lamparterdb93eec2015-05-05 11:04:59 +020073testcli_LDADD = ../lib/libzebra.la @LIBCAP@
paul41c14a12004-07-26 19:27:51 +000074testsig_LDADD = ../lib/libzebra.la @LIBCAP@
David Lamparter4d474fa2013-11-19 15:00:06 +010075testsegv_LDADD = ../lib/libzebra.la @LIBCAP@
paul4dcadf72005-04-13 03:31:35 +000076testbuffer_LDADD = ../lib/libzebra.la @LIBCAP@
77testmemory_LDADD = ../lib/libzebra.la @LIBCAP@
paul84771ee2005-10-11 03:48:28 +000078testprivs_LDADD = ../lib/libzebra.la @LIBCAP@
paul067fca82006-01-10 14:49:04 +000079teststream_LDADD = ../lib/libzebra.la @LIBCAP@
paul9f3f7a12005-04-25 16:42:24 +000080heavy_LDADD = ../lib/libzebra.la @LIBCAP@ -lm
81heavywq_LDADD = ../lib/libzebra.la @LIBCAP@ -lm
paul1d2c8932005-04-22 00:54:44 +000082heavythread_LDADD = ../lib/libzebra.la @LIBCAP@ -lm
Avneesh Sachdevd1d3ac92012-10-04 16:21:34 +000083aspathtest_LDADD = ../bgpd/libbgp.a ../lib/libzebra.la @LIBCAP@ -lm
84testbgpcap_LDADD = ../bgpd/libbgp.a ../lib/libzebra.la @LIBCAP@ -lm
85ecommtest_LDADD = ../bgpd/libbgp.a ../lib/libzebra.la @LIBCAP@ -lm
86testbgpmpattr_LDADD = ../bgpd/libbgp.a ../lib/libzebra.la @LIBCAP@ -lm
Paul Jakma5d4b8cf2008-11-16 18:34:19 +000087testchecksum_LDADD = ../lib/libzebra.la @LIBCAP@
Avneesh Sachdevd1d3ac92012-10-04 16:21:34 +000088testbgpmpath_LDADD = ../bgpd/libbgp.a ../lib/libzebra.la @LIBCAP@ -lm
Avneesh Sachdev28971c82012-08-17 08:19:50 -070089tabletest_LDADD = ../lib/libzebra.la @LIBCAP@ -lm
Christian Frankefa713d92013-07-05 15:35:37 +000090testnexthopiter_LDADD = ../lib/libzebra.la @LIBCAP@
Christian Franke8f399b02013-09-30 12:27:50 +000091testcommands_LDADD = ../lib/libzebra.la @LIBCAP@
Christian Frankeba32db12013-11-19 14:11:40 +000092test_timer_correctness_LDADD = ../lib/libzebra.la @LIBCAP@
93test_timer_performance_LDADD = ../lib/libzebra.la @LIBCAP@