diff options
author | Lou Berger <lberger@labn.net> | 2020-01-14 17:24:12 +0100 |
---|---|---|
committer | Lou Berger <lberger@labn.net> | 2020-01-21 12:27:43 +0100 |
commit | dccb75bbcff55cb832bf05c2699028c3ecfe0869 (patch) | |
tree | 507b5dcb1c69c16fd6ea7bab0575fdadfdaf92de /tests | |
parent | topotest: bgp_l3vpn_to_bgp_vrf - catch case of sharpd not being compiled (diff) | |
download | frr-dccb75bbcff55cb832bf05c2699028c3ecfe0869.tar.xz frr-dccb75bbcff55cb832bf05c2699028c3ecfe0869.zip |
topotest: log results summary at end of lutil run
Signed-off-by: Lou Berger <lberger@labn.net>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/topotests/lib/ltemplate.py | 1 | ||||
-rwxr-xr-x | tests/topotests/lib/lutil.py | 8 |
2 files changed, 9 insertions, 0 deletions
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') |