aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-09-10 17:18:28 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-09-12 03:06:37 +0200
commit3a9ff11e574fa7ee19b1062b2c90151dbf7f0e27 (patch)
tree24fa0205aef925d83eb60d8a09a7e4e774fa520a /configure.ac
parentec6fdbb128361fb374c8c21843c9f8223ac7a39d (diff)
logging vty: add VTY transcript test
I am setting out to refactor various details about logging. To show the effect, I am first adding this new test to illustrate the exact effects on the various osmo programs. Add logging_vty_test.c as a standalone program that simply defines a few logging categories and opens a telnet vty to play with. Add logging_vty_test.vty, as an osmo_verify_transcript_vty.py test script. Add --enable-external-tests to configure.ac, to enable running logging_vty_test.vty during 'make check'. Also allow running 'make vty-test' without the need to first configure with --enable-external-tests (a flexibility I've missed many times over in the other osmo source trees). Add a Makefile.am stub for external CTRL tests, basically a copy-paste from osmo-msc.git. I doubt that libosmocore will get python driven CTRL interface testing any time soon, but if so we will know to not run it concurrently. Change-Id: I948e832a33131f8eab98651d6010ceb0ccbc9a9c
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index dd5f15bc..bc3358a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -296,6 +296,21 @@ then
CPPFLAGS="$CPPFLAGS $WERROR_FLAGS"
fi
+AC_ARG_ENABLE([external_tests],
+ AC_HELP_STRING([--enable-external-tests],
+ [Include the VTY/CTRL tests in make check [default=no]]),
+ [enable_ext_tests="$enableval"],[enable_ext_tests="no"])
+if test "x$enable_ext_tests" = "xyes" ; then
+ AM_PATH_PYTHON
+ AC_CHECK_PROG(OSMOTESTEXT_CHECK,osmo_verify_transcript_vty.py,yes)
+ if test "x$OSMOTESTEXT_CHECK" != "xyes" ; then
+ AC_MSG_ERROR([Please install git://osmocom.org/python/osmo-python-tests to run the VTY/CTRL tests.])
+ fi
+fi
+AC_MSG_CHECKING([whether to enable VTY/CTRL tests])
+AC_MSG_RESULT([$enable_ext_tests])
+AM_CONDITIONAL(ENABLE_EXT_TESTS, test "x$enable_ext_tests" = "xyes")
+
CFLAGS="$CFLAGS -DBUILDING_LIBOSMOCORE -Wall"
CPPFLAGS="$CPPFLAGS -DBUILDING_LIBOSMOCORE -Wall"