diff --git a/doc/developer/topotests.rst b/doc/developer/topotests.rst index c2e72e2ec5..33ebe06d2f 100644 --- a/doc/developer/topotests.rst +++ b/doc/developer/topotests.rst @@ -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 \ diff --git a/tests/topotests/bgp_l3vpn_to_bgp_vrf/scripts/scale_up.py b/tests/topotests/bgp_l3vpn_to_bgp_vrf/scripts/scale_up.py index 21543ab78e..4ecaa4c026 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_vrf/scripts/scale_up.py +++ b/tests/topotests/bgp_l3vpn_to_bgp_vrf/scripts/scale_up.py @@ -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'] diff --git a/tests/topotests/lib/ltemplate.py b/tests/topotests/lib/ltemplate.py index 1d12d11a26..a76d8e4b08 100644 --- a/tests/topotests/lib/ltemplate.py +++ b/tests/topotests/lib/ltemplate.py @@ -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. diff --git a/tests/topotests/lib/lutil.py b/tests/topotests/lib/lutil.py index 7c89ada013..4ea97a3692 100755 --- a/tests/topotests/lib/lutil.py +++ b/tests/topotests/lib/lutil.py @@ -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')