mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 15:24:43 +00:00
tests: Cleanup generate_support_bundle() to not fail
The Support bundle generation was/is failing in both our upstream ci and locally. This cleans up the failures that I am seeing such that tests now continue to run instead of aborting the test run. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
4fb336424e
commit
ea570f2aa6
@ -936,14 +936,26 @@ def generate_support_bundle():
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
tgen = get_topogen()
|
tgen = get_topogen()
|
||||||
|
if tgen is None:
|
||||||
|
logger.warn(
|
||||||
|
"Support bundle attempted to be generated, but topogen is not being used"
|
||||||
|
)
|
||||||
|
return True
|
||||||
|
|
||||||
router_list = tgen.routers()
|
router_list = tgen.routers()
|
||||||
test_name = os.environ.get("PYTEST_CURRENT_TEST").split(":")[-1].split(" ")[0]
|
test_name = os.environ.get("PYTEST_CURRENT_TEST").split(":")[-1].split(" ")[0]
|
||||||
|
|
||||||
bundle_procs = {}
|
bundle_procs = {}
|
||||||
for rname, rnode in router_list.items():
|
for rname, rnode in router_list.items():
|
||||||
logger.info("Spawn collection of support bundle for %s", rname)
|
logger.info("Spawn collection of support bundle for %s", rname)
|
||||||
dst_bundle = "{}/{}/support_bundles/{}".format(tgen.logdir, rname, test_name)
|
try:
|
||||||
|
dst_bundle = "{}/{}/support_bundles/{}".format(
|
||||||
|
tgen.logdir, rname, test_name
|
||||||
|
)
|
||||||
rnode.run("mkdir -p " + dst_bundle)
|
rnode.run("mkdir -p " + dst_bundle)
|
||||||
|
except Exception as err:
|
||||||
|
logger.error("Generation of Support bundle failed {}".format(err))
|
||||||
|
return True
|
||||||
|
|
||||||
gen_sup_cmd = [
|
gen_sup_cmd = [
|
||||||
"/usr/lib/frr/generate_support_bundle.py",
|
"/usr/lib/frr/generate_support_bundle.py",
|
||||||
|
Loading…
Reference in New Issue
Block a user