]> git.puffer.fish Git - mirror/frr.git/commitdiff
tests: skip grpc test if frr not installed 10925/head
authorQuentin Young <qlyoung@nvidia.com>
Tue, 29 Mar 2022 20:16:35 +0000 (16:16 -0400)
committerQuentin Young <qlyoung@nvidia.com>
Tue, 29 Mar 2022 20:16:35 +0000 (16:16 -0400)
it wants yang models installed which will only be there if frr has been
installed before, causing `make check` to fail when run on a system on
which frr has not been installed when GRPC is enabled (--enable-grpc)

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
tests/lib/test_grpc.py

index 2e292fadc99bbef750e2d75331ba47c5cb616a2e..7f722de4222bf7af895bfec4f2b1d28cfaba77d2 100644 (file)
@@ -13,6 +13,10 @@ class TestGRPC(object):
         'S["GRPC_TRUE"]=""\n' not in open("../config.status").readlines(),
         reason="GRPC not enabled",
     )
+    @pytest.mark.skipif(
+        not os.path.isdir("/usr/share/yang"),
+        reason="YANG models aren't installed in /usr/share/yang",
+    )
     def test_exits_cleanly(self):
         basedir = os.path.dirname(inspect.getsourcefile(type(self)))
         program = os.path.join(basedir, self.program)