aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/contrib
diff options
context:
space:
mode:
authorKaterina Barone-Adesi <kat.obsc@gmail.com>2013-04-05 17:36:09 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-06-24 13:22:34 +0200
commite0aee7aaa964df27fdf6c451ea43af66c6d97b43 (patch)
tree32fb57f4c504b2c4f896c155e202961e66d2771e /openbsc/contrib
parentcc6b2d2fa30ad628833bf764caa8fdbac5aa1213 (diff)
Introduced support for external python tests
The test scripts warn about missing documentation, untested configs, check common errors, and stub out testing individual VTY commands. The scripts have been moved to the another osmocom repository, python/osmo-python-tests The features were requested by zecke.
Diffstat (limited to 'openbsc/contrib')
-rwxr-xr-xopenbsc/contrib/dump_all_docs.py57
1 files changed, 0 insertions, 57 deletions
diff --git a/openbsc/contrib/dump_all_docs.py b/openbsc/contrib/dump_all_docs.py
deleted file mode 100755
index 2a67cb7f5..000000000
--- a/openbsc/contrib/dump_all_docs.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env python
-
-"""
-Start the process and dump the documentation to the doc dir. This is
-copied from the BTS directory and a fix might need to be applied there
-too.
-"""
-
-import socket, subprocess, time,os
-
-
-def dump_doc(end, port, filename):
- sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- sck.setblocking(1)
- sck.connect(("localhost", port))
- sck.recv(4096)
-
- # Now send the command
- sck.send("show online-help\r")
- xml = ""
- while True:
- data = sck.recv(4096)
- xml = "%s%s" % (xml, data)
- if data.endswith(end):
- break
-
- # Now write everything until the end to the file
- out = open(filename, 'w')
- out.write(xml[18:len(end)*-1])
- out.close()
-
-
-apps = [
- # The same could be done with an empty config file but this way
- # the example files are properly tested.
- (4242, "src/osmo-nitb/osmo-nitb", "doc/examples/osmo-nitb/nanobts/openbsc.cfg", "OpenBSC", "nitb"),
- (4242, "src/osmo-bsc/osmo-bsc", "doc/examples/osmo-bsc/osmo-bsc.cfg", "OsmoBSC", "bsc"),
- (4243, "src/osmo-bsc_mgcp/osmo-bsc_mgcp", "doc/examples/osmo-bsc_mgcp/mgcp.cfg", "OpenBSC MGCP", "mgcp"),
- (4244, "src/osmo-bsc_nat/osmo-bsc_nat", "doc/examples/osmo-bsc_nat/osmo-bsc_nat.cfg", "OsmoBSCNAT", "nat"),
- (4245, "src/gprs/osmo-sgsn", "doc/examples/osmo-sgsn/osmo-sgsn.cfg", "OsmoSGSN", "sgsn"),
- (4246, "src/gprs/osmo-gbproxy", "doc/examples/osmo-gbproxy/osmo-gbproxy.cfg", "OsmoGbProxy", "gbproxy"),
-]
-
-# Dump the config of all our apps
-for app in apps:
- print "Starting app for %s" % app[4]
-
- cmd = [app[1], "-c", app[2]]
- proc = subprocess.Popen(cmd, stdin=None, stdout=None)
- time.sleep(1)
- try:
- dump_doc('\r\n%s> ' % app[3], app[0], 'doc/%s_vty_reference.xml' % app[4])
- finally:
- # Clean-up
- proc.kill()
- proc.wait()
-