diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-12-05 02:24:16 +0100 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2018-12-05 03:14:19 +0100 |
commit | 91547b7cc99d193c8bd4852deb450a254579e985 (patch) | |
tree | 2464e176bdca88df92d1604dad32327729b39818 | |
parent | 9d4b5cad095da2e4784f00099dfc48250f05d52e (diff) |
make: prepare for adding transcript tests
Separate 'make python-test' into separate make targets, to sensibly add VTY
transcript tests in an upcoming commit.
Feature: even though ./configure was called without --enable-external-tests,
each of the {ctrl,vty}x{python,transcript} tests can be invoked individually by
e.g. 'make vty-python-test'.
A peculiarity is that we use AM_PYTHON_PATH to figure out the 'python' command
to invoke as $(PYTHON), but it is empty when not configured with
--enable-external-tests. In that case, explain to the user that passing
'PYTHON=python' as make argument still allows running the tests. We could
always invoke AM_PYTHON_PATH, but that's not really needed.
Both 'vty-transcript-test' and 'ctrl-transcript-test' are still empty, a
subsequent patch adds a vty-transcript-test.
All of this in preparation of tweaking the 'mncc' vty configuration, to be able
to track it in a vty transcript test.
Change-Id: I688657e56ae469c07b9f25ba37275d38dbd457e2
-rw-r--r-- | tests/Makefile.am | 41 |
1 files changed, 34 insertions, 7 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index c225afab9..fce110d13 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -44,18 +44,45 @@ DISTCLEANFILES = \ if ENABLE_EXT_TESTS python-tests: $(BUILT_SOURCES) +# don't run vty and ctrl tests concurrently so that the ports don't conflict + $(MAKE) vty-test + $(MAKE) ctrl-test +else +python-tests: $(BUILT_SOURCES) + echo "Not running python-based tests (determined at configure-time)" +endif + +vty-python-test: $(BUILT_SOURCES) + if [ -z "$(PYTHON)" ]; then echo "ERROR: python not configured, for manual invocation use 'make PYTHON=/usr/bin/python'"; exit 1; fi osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v $(PYTHON) $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v + rm -f $(top_builddir)/sms.db + +# To update the VTY script from current application behavior, +# pass -u to vty_script_runner.py by doing: +# make vty-transcript-test U=-u +vty-transcript-test: + echo "No vty-transcript-test exists yet" + +vty-test: + $(MAKE) vty-python-test + $(MAKE) vty-transcript-test + +ctrl-python-test: $(BUILT_SOURCES) + if [ -z "$(PYTHON)" ]; then echo "ERROR: python not configured, for manual invocation use 'make PYTHON=/usr/bin/python'"; exit 1; fi $(PYTHON) $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v -if BUILD_SMPP - $(PYTHON) $(srcdir)/smpp_test_runner.py -w $(abs_top_builddir) -v -endif rm -f $(top_builddir)/sms.db -else -python-tests: $(BUILT_SOURCES) - echo "Not running python-based tests (determined at configure-time)" -endif + +# To update the CTRL script from current application behavior, +# pass -u to ctrl_script_runner.py by doing: +# make ctrl-transcript-test U=-u +ctrl-transcript-test: + echo "No ctrl-transcript-test exists yet" + +ctrl-test: + $(MAKE) ctrl-python-test + $(MAKE) ctrl-transcript-test check-local: atconfig $(TESTSUITE) $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS) |