diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2014-04-01 19:34:55 +0200 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2014-04-01 20:21:19 +0200 |
| commit | e712d0e3667ffad8109ef8bce3ce01927ee95bb7 (patch) | |
| tree | 7d3fd696c771e742c20135a12b4a8f1e382944ac | |
| parent | 8f399b0e4fff2344d75ebf709e1ce55f15269db2 (diff) | |
tests: fix build & disable testcommands
The perils of having tests, the test wasn't tested thoroughly enough...
Fixup various automake problems, and then disable it since it depends on
configure parameters in its current version.
For 0.99.24 we can ship a static copy of vtysh_cmd.c and have it
reenabled.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| -rw-r--r-- | tests/Makefile.am | 3 | ||||
| -rw-r--r-- | tests/libzebra.tests/testcommands.exp | 10 | ||||
| -rw-r--r-- | tests/testcommands.refout (renamed from tests/testcommands.out) | 0 |
3 files changed, 11 insertions, 2 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index ceca606a55..8707fe7d94 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -11,7 +11,7 @@ EXTRA_DIST = \ lib/libzebra.exp \ global-conf.exp \ testcommands.in \ - testcommands.out + testcommands.refout INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib DEFS = @DEFS@ $(LOCAL_OPTS) -DSYSCONFDIR=\"$(sysconfdir)/\" @@ -42,6 +42,7 @@ test-commands-defun.c: ../vtysh/vtysh_cmd.c < ../vtysh/vtysh_cmd.c \ > test-commands-defun.c +BUILT_SOURCES = test-commands-defun.c noinst_HEADERS = prng.h testsig_SOURCES = test-sig.c diff --git a/tests/libzebra.tests/testcommands.exp b/tests/libzebra.tests/testcommands.exp index f760c6d7f5..d4bfc8231f 100644 --- a/tests/libzebra.tests/testcommands.exp +++ b/tests/libzebra.tests/testcommands.exp @@ -1,7 +1,15 @@ set timeout 30 set test_name "testcommands" -spawn sh -c "./testcommands -e 0 < testcommands.in | diff -au - testcommands.out" +if {![info exists env(QUAGGA_TEST_COMMANDS)]} { + # sadly, the test randomly fails when configure parameters differ from + # what was used to create testcommands.refout. this can be fixed by + # shipping a matching vtysh_cmd.c, which we'll add after 0.99.23 + unresolved "$test_name" + exit 0 +} + +spawn sh -c "./testcommands -e 0 < $env(srcdir)/testcommands.in | diff -au - $env(srcdir)/testcommands.refout" expect { eof { diff --git a/tests/testcommands.out b/tests/testcommands.refout index 1422aefccc..1422aefccc 100644 --- a/tests/testcommands.out +++ b/tests/testcommands.refout |
