mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-28 19:43:29 +00:00
lib/ltemplate.py: add KeepGoing parameter to ltemplateTest
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
This commit is contained in:
parent
19246819f4
commit
90d56c6cca
@ -144,7 +144,7 @@ def teardown_module(mod):
|
||||
tgen.stop_topology()
|
||||
_lt = None
|
||||
|
||||
def ltemplateTest(script, SkipIfFailed=True, CallOnFail=None, CheckFuncStr=None):
|
||||
def ltemplateTest(script, SkipIfFailed=True, CallOnFail=None, CheckFuncStr=None, KeepGoing=False):
|
||||
tgen = get_topogen()
|
||||
if not os.path.isfile(script):
|
||||
if not os.path.isfile(os.path.join(_lt.scriptdir, script)):
|
||||
@ -156,7 +156,8 @@ def ltemplateTest(script, SkipIfFailed=True, CallOnFail=None, CheckFuncStr=None)
|
||||
if SkipIfFailed and tgen.routers_have_failure():
|
||||
pytest.skip(tgen.errors)
|
||||
if numEntry > 0:
|
||||
pytest.skip("Have %d errors" % numEntry)
|
||||
if not KeepGoing:
|
||||
pytest.skip("Have %d errors" % numEntry)
|
||||
|
||||
if CheckFuncStr != None:
|
||||
check = eval(CheckFuncStr)
|
||||
@ -170,7 +171,8 @@ def ltemplateTest(script, SkipIfFailed=True, CallOnFail=None, CheckFuncStr=None)
|
||||
if numFail > 0:
|
||||
luShowFail()
|
||||
fatal_error = "%d tests failed" % numFail
|
||||
assert "scripts/cleanup_all.py failed" == "See summary output above", fatal_error
|
||||
if not KeepGoing:
|
||||
assert "scripts/cleanup_all.py failed" == "See summary output above", fatal_error
|
||||
|
||||
# Memory leak test template
|
||||
def test_memory_leak():
|
||||
|
Loading…
Reference in New Issue
Block a user