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>
diff --git a/tests/libzebra.tests/testcommands.exp b/tests/libzebra.tests/testcommands.exp
index f760c6d..d4bfc82 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 {