<p>Neels Hofmeyr has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/12126">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">make: prepare for adding transcript tests<br><br>Separate 'make python-test' into separate make targets, to sensibly add VTY<br>transcript tests in an upcoming commit.<br><br>Feature: even though ./configure was called without --enable-external-tests,<br>each of the {ctrl,vty}x{python,transcript} tests can be invoked individually by<br>e.g. 'make vty-python-test'.<br><br>A peculiarity is that we use AM_PYTHON_PATH to figure out the 'python' command<br>to invoke as $(PYTHON), but it is empty when not configured with<br>--enable-external-tests. In that case, explain to the user that passing<br>'PYTHON=python' as make argument still allows running the tests. We could<br>always invoke AM_PYTHON_PATH, but that's not really needed.<br><br>Both 'vty-transcript-test' and 'ctrl-transcript-test' are still empty, a<br>subsequent patch adds a vty-transcript-test.<br><br>All of this in preparation of tweaking the 'mncc' vty configuration, to be able<br>to track it in a vty transcript test.<br><br>Change-Id: I688657e56ae469c07b9f25ba37275d38dbd457e2<br>---<br>M tests/Makefile.am<br>1 file changed, 35 insertions(+), 8 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/26/12126/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/Makefile.am b/tests/Makefile.am</span><br><span>index c225afa..fce110d 100644</span><br><span>--- a/tests/Makefile.am</span><br><span>+++ b/tests/Makefile.am</span><br><span>@@ -44,19 +44,46 @@</span><br><span> </span><br><span> if ENABLE_EXT_TESTS</span><br><span> python-tests: $(BUILT_SOURCES)</span><br><span style="color: hsl(0, 100%, 40%);">-       osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v</span><br><span style="color: hsl(0, 100%, 40%);">-   osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v</span><br><span style="color: hsl(0, 100%, 40%);">-        $(PYTHON) $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v</span><br><span style="color: hsl(0, 100%, 40%);">-        $(PYTHON) $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v</span><br><span style="color: hsl(0, 100%, 40%);">-if BUILD_SMPP</span><br><span style="color: hsl(0, 100%, 40%);">-  $(PYTHON) $(srcdir)/smpp_test_runner.py -w $(abs_top_builddir) -v</span><br><span style="color: hsl(0, 100%, 40%);">-endif</span><br><span style="color: hsl(0, 100%, 40%);">-  rm -f $(top_builddir)/sms.db</span><br><span style="color: hsl(120, 100%, 40%);">+# don't run vty and ctrl tests concurrently so that the ports don't conflict</span><br><span style="color: hsl(120, 100%, 40%);">+    $(MAKE) vty-test</span><br><span style="color: hsl(120, 100%, 40%);">+      $(MAKE) ctrl-test</span><br><span> else</span><br><span> python-tests: $(BUILT_SOURCES)</span><br><span>  echo "Not running python-based tests (determined at configure-time)"</span><br><span> endif</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+vty-python-test: $(BUILT_SOURCES)</span><br><span style="color: hsl(120, 100%, 40%);">+        if [ -z "$(PYTHON)" ]; then echo "ERROR: python not configured, for manual invocation use 'make PYTHON=/usr/bin/python'"; exit 1; fi</span><br><span style="color: hsl(120, 100%, 40%);">+      osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v</span><br><span style="color: hsl(120, 100%, 40%);">+ osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v</span><br><span style="color: hsl(120, 100%, 40%);">+      $(PYTHON) $(srcdir)/vty_test_runner.py -w $(abs_top_builddir) -v</span><br><span style="color: hsl(120, 100%, 40%);">+      rm -f $(top_builddir)/sms.db</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# To update the VTY script from current application behavior,</span><br><span style="color: hsl(120, 100%, 40%);">+# pass -u to vty_script_runner.py by doing:</span><br><span style="color: hsl(120, 100%, 40%);">+#   make vty-transcript-test U=-u</span><br><span style="color: hsl(120, 100%, 40%);">+vty-transcript-test:</span><br><span style="color: hsl(120, 100%, 40%);">+   echo "No vty-transcript-test exists yet"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+vty-test:</span><br><span style="color: hsl(120, 100%, 40%);">+       $(MAKE) vty-python-test</span><br><span style="color: hsl(120, 100%, 40%);">+       $(MAKE) vty-transcript-test</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ctrl-python-test: $(BUILT_SOURCES)</span><br><span style="color: hsl(120, 100%, 40%);">+     if [ -z "$(PYTHON)" ]; then echo "ERROR: python not configured, for manual invocation use 'make PYTHON=/usr/bin/python'"; exit 1; fi</span><br><span style="color: hsl(120, 100%, 40%);">+      $(PYTHON) $(srcdir)/ctrl_test_runner.py -w $(abs_top_builddir) -v</span><br><span style="color: hsl(120, 100%, 40%);">+     rm -f $(top_builddir)/sms.db</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# To update the CTRL script from current application behavior,</span><br><span style="color: hsl(120, 100%, 40%);">+# pass -u to ctrl_script_runner.py by doing:</span><br><span style="color: hsl(120, 100%, 40%);">+#   make ctrl-transcript-test U=-u</span><br><span style="color: hsl(120, 100%, 40%);">+ctrl-transcript-test:</span><br><span style="color: hsl(120, 100%, 40%);">+       echo "No ctrl-transcript-test exists yet"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ctrl-test:</span><br><span style="color: hsl(120, 100%, 40%);">+     $(MAKE) ctrl-python-test</span><br><span style="color: hsl(120, 100%, 40%);">+      $(MAKE) ctrl-transcript-test</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> check-local: atconfig $(TESTSUITE)</span><br><span>         $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS)</span><br><span>    $(MAKE) $(AM_MAKEFLAGS) python-tests</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/12126">change 12126</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/12126"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-msc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I688657e56ae469c07b9f25ba37275d38dbd457e2 </div>
<div style="display:none"> Gerrit-Change-Number: 12126 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>