topotest: minor doc, lutil, sharpd not compiled changes (#5675)

topotest: minor doc, lutil, sharpd not compiled changes
This commit is contained in:
David Lamparter 2020-01-21 17:32:59 +01:00 committed by GitHub
commit 42440fcfa6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 5 deletions

View File

@ -79,6 +79,7 @@ If you prefer to manually build FRR, then use the following suggested config:
--sysconfdir=/etc/frr \
--enable-vtysh \
--enable-pimd \
--enable-sharpd \
--enable-multipath=64 \
--enable-user=frr \
--enable-group=frr \

View File

@ -23,15 +23,16 @@ for rtr in rtrs:
mem_z[rtr] = {'value': int(found.group(1)), 'units': found.group(2)}
mem_b[rtr] = {'value': int(found.group(3)), 'units': found.group(4)}
luCommand('ce1', 'vtysh -c "sharp data nexthop"', 'sharpd is not running', 'none','check if sharpd running')
doSharp = True
luCommand('ce1', 'vtysh -c "show mem"', 'qmem sharpd', 'none','check if sharpd running')
doSharp = False
found = luLast()
if ret != False and found != None:
if len(found.group()):
luCommand('ce1', 'vtysh -c "sharp data nexthop"', 'sharpd is not running', 'pass','sharpd NOT running, skipping test')
doSharp = False
doSharp = True
if doSharp == True:
if doSharp != True:
luCommand('ce1', 'vtysh -c "sharp data nexthop"', '.', 'pass','sharpd NOT running, skipping test')
else:
luCommand('ce1', 'vtysh -c "sharp install routes 10.0.0.0 nexthop 99.0.0.1 {}"'.format(num),'','pass','Adding {} routes'.format(num))
luCommand('ce2', 'vtysh -c "sharp install routes 10.0.0.0 nexthop 99.0.0.2 {}"'.format(num),'','pass','Adding {} routes'.format(num))
rtrs = ['ce1', 'ce2', 'ce3']

View File

@ -134,6 +134,7 @@ def teardown_module(mod):
tgen = get_topogen()
if _lt != None and _lt.scriptdir != None and _lt.prestarthooksuccess == True:
luShowResults(logger.info)
print(luFinish())
# This function tears down the whole topology.

View File

@ -336,6 +336,14 @@ def luNumPass():
def luResult(target, success, str, logstr=None):
return LUtil.result(target, success, str, logstr)
def luShowResults(prFunction):
printed = 0
sf = open(LUtil.fsum_name, 'r')
for line in sf:
printed+=1
prFunction(line.rstrip())
sf.close()
def luShowFail():
printed = 0
sf = open(LUtil.fsum_name, 'r')