aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-10-15 03:01:09 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-10-17 02:11:58 +0200
commit726b58dcfbbdfc95ae0872e20a2f6066ce37fed2 (patch)
treed2c1b34818867b0cbe3481a38edf75850a921ec8 /setup.py
parent92f310500cfd68851f00c813e6d86af375f17311 (diff)
add osmo_verify_transcript_{vty,ctrl}.py for easier vty and ctrl testing
While adding VTY and CTRL tests to new programs like OsmoHLR, I wanted to have a simple way to translate a VTY interaction transcript to a VTY python test. It is fairly trivial to simply read in a transcript, extract both the commands to send as well as the expected results, and to verify these without having to write one line of application-specific code. From there it was just a little step to allow the same for CTRL interaction. With osmo_verify_transcript_vty.py and osmo_verify_transcript_ctrl.py, it is possible to have a simple text file of a telnet VTY or CTRL interface interaction and run it against a given application. With the --update option, the scripts run the given command and rewrite the transcript file to whatever the application currently produces as response. Backed by version control, it is super easy to tweak commands, --update the test results and verify that only the desired bits changed. A '...' wildcard can skip any number of lines in the expected result and is usually preserved during --update. This python3 implementation is independent from the previous obscvty implementations. Take the opportunity to clarify/fix a few aspects: for example, it is now possible to verify the hints that the interactive VTY displays when the user enters '?' in various places, and to evaluate the prompt character '>'/'#'. Unitl now, code is duplicated/scattered across various vty_test_runner.py scripts in different git repositories. Now, a VTY or CTRL transcript is enough to put a complete test in place. The simplest invocation is directly from the Makefile, feeding an application commandline, the proper port number to contact it and e.g. a VTY prompt name. This new code is also usable as python modules, to be able to build more complex tests that require specialized intermediate actions, possibly coordinating launch of applications or data manipulation. The first repository to employ this is osmo-hlr.git. See change-ids I42b3b70a0439a8f2e4964d7cc31e593c1f0d7537 for VTY and Iff93abe370b8f3ecf42082d1d0eaa1fbeca5b122 for CTRL. Change-Id: Id47331009910e651372b9c9c76e12f2e8964cc2c
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 44e7fd1..9c25a0d 100755
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,9 @@ setup(
version = __version__,
packages = ["osmopy"],
scripts = ["osmopy/osmodumpdoc.py", "osmopy/osmotestconfig.py",
- "osmopy/osmotestvty.py"],
+ "osmopy/osmotestvty.py",
+ "osmopy/osmo_verify_transcript_vty.py",
+ "osmopy/osmo_verify_transcript_ctrl.py"],
license = "AGPLv3",
description = "Osmopython: osmocom testing scripts",
author = "Katerina Barone-Adesi",