]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tests: Do not Cause test scripts to stop running when config load fails
authorDonald Sharp <sharpd@nvidia.com>
Sun, 21 May 2023 23:39:39 +0000 (19:39 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Mon, 22 May 2023 14:52:54 +0000 (10:52 -0400)
When running the pytests in parallel, calling pytest.exit() causes
the entire test run to be aborted.  Which.... Is frankly not cool.
Let's notice the failure and move on to the next tests.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests/topotests/lib/topojson.py

index 23a6c869934a811330bacb1eec5b7ab024f75089..901e4f623a16189be146d43c837ecc25bdf0a28b 100644 (file)
@@ -340,7 +340,7 @@ def build_config_from_json(tgen, topo=None, save_bkup=True):
     result = load_config_to_routers(tgen, routers, save_bkup)
     if not result:
         logger.info("build_config_from_json: failed to configure topology")
-        pytest.exit(1)
+        assert False
 
     logger.info(
         "Built config now clearing ospf neighbors as that router-id might not be what is used"