summaryrefslogtreecommitdiffstats
path: root/tests/Makefile.am
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 /tests/Makefile.am
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 'tests/Makefile.am')
-rw-r--r--tests/Makefile.am30
1 files changed, 29 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 5d07695a..18d4bb4a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -24,7 +24,9 @@ check_PROGRAMS = timer/timer_test sms/sms_test ussd/ussd_test \
abis/abis_test endian/endian_test sercomm/sercomm_test \
prbs/prbs_test gsm23003/gsm23003_test \
codec/codec_ecu_fr_test timer/clk_override_test \
- oap/oap_client_test
+ oap/oap_client_test \
+ logging/logging_vty_test \
+ $(NULL)
if ENABLE_MSGFILE
check_PROGRAMS += msgfile/msgfile_test
@@ -148,6 +150,9 @@ gb_gprs_ns_test_LDADD = $(LDADD) $(top_builddir)/src/gb/libosmogb.la $(LIBRARY_D
logging_logging_test_SOURCES = logging/logging_test.c
+logging_logging_vty_test_SOURCES = logging/logging_vty_test.c
+logging_logging_vty_test_LDADD = $(LDADD) $(top_builddir)/src/vty/libosmovty.la
+
fr_fr_test_SOURCES = fr/fr_test.c
fr_fr_test_LDADD = $(LDADD) $(top_builddir)/src/gb/libosmogb.la $(LIBRARY_DLSYM) \
$(top_builddir)/src/vty/libosmovty.la \
@@ -280,6 +285,7 @@ TESTSUITE = $(srcdir)/testsuite
check-local: atconfig $(TESTSUITE)
cat /proc/cpuinfo
$(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS)
+ $(MAKE) $(AM_MAKEFLAGS) ext-tests
installcheck-local: atconfig $(TESTSUITE)
$(SHELL) '$(TESTSUITE)' AUTOTEST_PATH='$(bindir)' \
@@ -298,3 +304,25 @@ $(TESTSUITE): $(srcdir)/testsuite.at $(srcdir)/package.m4
conv/gsm0503_test_vectors.c: $(top_srcdir)/utils/conv_gen.py $(top_srcdir)/utils/conv_codes_gsm.py
$(AM_V_GEN)python $(top_srcdir)/utils/conv_gen.py gen_vectors gsm \
--target-path $(builddir)/conv
+
+if ENABLE_EXT_TESTS
+ext-tests:
+# don't run vty and ctrl tests concurrently so that the ports don't conflict
+ $(MAKE) vty-test
+ $(MAKE) ctrl-test
+else
+ext-tests:
+ echo "Not running python-based external tests (determined at configure-time)"
+endif
+
+# To update the VTY script from current application behavior,
+# pass -u to osmo_verify_transcript_vty.py by doing:
+# make vty-test U=-u
+vty-test:
+ osmo_verify_transcript_vty.py -v \
+ -p 42042 \
+ -r "$(top_builddir)/tests/logging/logging_vty_test" \
+ $(U) $(srcdir)/logging/*.vty
+
+ctrl-test:
+ echo "No CTRL tests exist currently"