From: Lou Berger Date: Tue, 14 Jan 2020 16:24:12 +0000 (-0500) Subject: topotest: log results summary at end of lutil run X-Git-Tag: frr-7.5.1~864^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=dccb75bbcff55cb832bf05c2699028c3ecfe0869;p=mirror_frr.git topotest: log results summary at end of lutil run Signed-off-by: Lou Berger --- diff --git a/tests/topotests/lib/ltemplate.py b/tests/topotests/lib/ltemplate.py index 1d12d11a2..a76d8e4b0 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 7c89ada01..4ea97a369 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')