summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Dufour2013-06-07 11:06:38 +0200
committerOlivier Dufour2013-06-07 16:34:31 +0200
commit2edfc34b89684d0a99b4f32f70e21536b3109921 (patch)
tree59beadecb9a9294f85555e694d33b3c1c35f495c
parent76cb94008c641512172c1b98c0d78d157c9afeb9 (diff)
validation/test/av_home: fix some RST formating issues, closes #4042
-rwxr-xr-xvalidation/test/av_home/av_home.py13
-rwxr-xr-xvalidation/test/av_home/av_mme.py4
2 files changed, 12 insertions, 5 deletions
diff --git a/validation/test/av_home/av_home.py b/validation/test/av_home/av_home.py
index 57185a25d0..13b15b992a 100755
--- a/validation/test/av_home/av_home.py
+++ b/validation/test/av_home/av_home.py
@@ -356,8 +356,7 @@ def do_plot (direction, directory):
pylab.clf()
def get_test_data ():
- tpl = """Test {name}
-================
+ tpl = """{name}
::
@@ -385,12 +384,13 @@ Tonemaps and throughput
dir_re = re.compile (r"^test_home-(.*)$")
for d in sorted(directories):
if dir_re.match (d):
+ name = get_name (dir_re.match (d).group (1))
desc = get_test_desc (d)
discovery = get_field (d, "discovery")
avln = get_field (d, "avln")
attenuation = get_field (d, "attenuation")
graph = get_graph (d)
- result += tpl.format (name = dir_re.match (d).group (1),
+ result += tpl.format (name = name,
desc = desc,
discovery = discovery,
avln = avln,
@@ -398,6 +398,13 @@ Tonemaps and throughput
graph = graph)
return result
+def get_name (name):
+ result = "Test %s:" % name
+ underline = ""
+ for i in xrange (len(result)):
+ underline += "="
+ return result + "\n" + underline
+
def get_field (d, file):
f = open (os.path.join (av_home_attr.prefix, d, "%s-master" % file), "r")
value = f.read ()
diff --git a/validation/test/av_home/av_mme.py b/validation/test/av_home/av_mme.py
index b3787b7be3..97a6b78ebf 100755
--- a/validation/test/av_home/av_mme.py
+++ b/validation/test/av_home/av_mme.py
@@ -158,7 +158,7 @@ List of neighbor networks for {plug}:
stations += "+-------------------+------+-----+\n"
if ans[CC_DISCOVER_LIST_CNF].num_network != 0:
for e in ans[CC_DISCOVER_LIST_CNF].networks:
- networks += "| %s | %02d |\n" % (e.nid, int (e.snid))
+ networks += "| %16s | %02d |\n" % (e.nid, int (e.snid))
networks += "+-------------------+------+\n"
discover = discover.format (plug = av_home_attr.plug_mac,
stations = stations,
@@ -183,7 +183,7 @@ AVLN(s) for {plug}:
"""
avlns = ""
for e in ans[CM_NW_INFO_CNF].nwinfo:
- avlns += "| %s | %02d | %03d | %s |\n" % (e.nid, int (e.snid), int (e.tei), role[e.stationrole])
+ avlns += "| %16s | %02d | %03d | %s |\n" % (e.nid, int (e.snid), int (e.tei), role[e.stationrole])
avlns += "+-------------------+------+-----+------+\n"
avln = avln.format (plug = av_home_attr.plug_mac, avlns = avlns)
print >>f, avln,