summaryrefslogtreecommitdiff
path: root/tests/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r--tests/Makefile.am18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9260a900..ba2d6f10 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -9,7 +9,9 @@ EXTRA_DIST = \
config/unix.exp \
lib/bgpd.exp \
lib/libzebra.exp \
- global-conf.exp
+ global-conf.exp \
+ testcommands.in \
+ testcommands.out
INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib
DEFS = @DEFS@ $(LOCAL_OPTS) -DSYSCONFDIR=\"$(sysconfdir)/\"
@@ -26,10 +28,22 @@ endif
check_PROGRAMS = testsig testbuffer testmemory heavy heavywq heavythread \
testprivs teststream testchecksum tabletest testnexthopiter \
+ testcommands \
$(TESTS_BGPD)
noinst_HEADERS = prng.h
+../vtysh/vtysh_cmd.c:
+ $(MAKE) -C ../vtysh vtysh_cmd.c
+
+test-commands-defun.c: ../vtysh/vtysh_cmd.c
+ sed \
+ -e '/"vtysh.h"/d' \
+ -e 's/vtysh_init_cmd/test_init_cmd/' \
+ -e 's/VTYSH_[A-Z][A-Z_0-9]*/0/g' \
+ < ../vtysh/vtysh_cmd.c \
+ > test-commands-defun.c
+
testsig_SOURCES = test-sig.c
testbuffer_SOURCES = test-buffer.c
testmemory_SOURCES = test-memory.c
@@ -46,6 +60,7 @@ testchecksum_SOURCES = test-checksum.c
testbgpmpath_SOURCES = bgp_mpath_test.c
tabletest_SOURCES = table_test.c
testnexthopiter_SOURCES = test-nexthop-iter.c prng.c
+testcommands_SOURCES = test-commands-defun.c test-commands.c prng.c
testsig_LDADD = ../lib/libzebra.la @LIBCAP@
testbuffer_LDADD = ../lib/libzebra.la @LIBCAP@
@@ -63,3 +78,4 @@ testchecksum_LDADD = ../lib/libzebra.la @LIBCAP@
testbgpmpath_LDADD = ../bgpd/libbgp.a ../lib/libzebra.la @LIBCAP@ -lm
tabletest_LDADD = ../lib/libzebra.la @LIBCAP@ -lm
testnexthopiter_LDADD = ../lib/libzebra.la @LIBCAP@
+testcommands_LDADD = ../lib/libzebra.la @LIBCAP@