From: G. Paul Ziemba Date: Sat, 3 Mar 2018 20:22:39 +0000 (-0800) Subject: lib/ltemplate.py: add KeepGoing parameter to ltemplateTest X-Git-Tag: frr-7.1-dev~151^2~95 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=90d56c6cca0a6ac24ff31cfb509211b75e009af3;p=mirror%2Ffrr.git lib/ltemplate.py: add KeepGoing parameter to ltemplateTest Signed-off-by: G. Paul Ziemba --- diff --git a/tests/topotests/lib/ltemplate.py b/tests/topotests/lib/ltemplate.py index 9c511f7bc7..5843b4096a 100644 --- a/tests/topotests/lib/ltemplate.py +++ b/tests/topotests/lib/ltemplate.py @@ -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():