]> git.puffer.fish Git - mirror/frr.git/commitdiff
template: add router check test
authorRafael Zalamena <rzalamena@gmail.com>
Thu, 13 Jul 2017 12:49:37 +0000 (09:49 -0300)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 28 Nov 2018 01:22:11 +0000 (20:22 -0500)
Show test developers that they can check if routers are running by
calling tgen.routers_have_failure().

tests/topotests/example-test/test_template.py

index fda2248b317be6f3f5275b79a4a1739b6474329c..4e35ce8b9f9015561fbff0592f38215d7ea22106 100755 (executable)
@@ -99,6 +99,10 @@ def teardown_module(mod):
 def test_call_mininet_cli():
     "Dummy test that just calls mininet CLI so we can interact with the build."
     tgen = get_topogen()
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
     logger.info('calling mininet CLI')
     tgen.mininet_cli()