diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-04-10 20:58:35 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-10 20:58:35 +0300 |
| commit | 3d3f9684aea3fa9fccb2ab6e825ca53f3649bd0c (patch) | |
| tree | 9f45d3c678b30d3f41566c7953ca21ffbea5323d /tests/topotests/lib/common_config.py | |
| parent | 5ff94749d3d3cc59411cdf2c366530733fa04176 (diff) | |
| parent | ea570f2aa68494dbbf4947f59b261bde3184ca76 (diff) | |
Merge pull request #15582 from donaldsharp/zebra_rtadv_use_without_init
Zebra rtadv use without init
Diffstat (limited to 'tests/topotests/lib/common_config.py')
| -rw-r--r-- | tests/topotests/lib/common_config.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py index 598db84e63..7787b6f74b 100644 --- a/tests/topotests/lib/common_config.py +++ b/tests/topotests/lib/common_config.py @@ -936,14 +936,26 @@ def generate_support_bundle(): """ 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() test_name = os.environ.get("PYTEST_CURRENT_TEST").split(":")[-1].split(" ")[0] bundle_procs = {} for rname, rnode in router_list.items(): logger.info("Spawn collection of support bundle for %s", rname) - dst_bundle = "{}/{}/support_bundles/{}".format(tgen.logdir, rname, test_name) - rnode.run("mkdir -p " + dst_bundle) + try: + dst_bundle = "{}/{}/support_bundles/{}".format( + tgen.logdir, rname, test_name + ) + rnode.run("mkdir -p " + dst_bundle) + except Exception as err: + logger.error("Generation of Support bundle failed {}".format(err)) + return True gen_sup_cmd = [ "/usr/lib/frr/generate_support_bundle.py", |
