]> git.puffer.fish Git - mirror/frr.git/commitdiff
Fix output to allow it on generic Debian
authorMartin Winter <mwinter@opensourcerouting.org>
Thu, 26 Oct 2017 00:56:33 +0000 (17:56 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 28 Nov 2018 01:22:12 +0000 (20:22 -0500)
- Generic Debian only has a single space in front of “proto” in the linux shell routing outptu

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
tests/topotests/ldp-topo1/test_ldp_topo1.py
tests/topotests/ospf6-topo1/test_ospf6_topo1.py

index 818e64723e1e9dde2014c26877a099e1b74d8b07..c8ea438cce788f862d565244683a78d313b0657e 100755 (executable)
@@ -690,7 +690,7 @@ def test_linux_mpls_routes():
             actual = re.sub(r"[0-9][0-9] via inet ", "xx via inet ", actual)
             actual = re.sub(r"[0-9][0-9]  proto", "xx  proto", actual)
             actual = re.sub(r"[0-9][0-9] as to ", "xx as to ", actual)
-            actual = re.sub(r"proto \w+", "proto xx", actual)
+            actual = re.sub(r"[ ]+proto \w+", "  proto xx", actual)
  
             # Fix newlines (make them all the same)
             actual = ('\n'.join(actual.splitlines()) + '\n').splitlines(1)
index 2c49dff23b1530a526e97063cd862bf67e11ef18..fd65699e7f19fbc1a4e0784d0f460f37ed69ace7 100755 (executable)
@@ -332,7 +332,7 @@ def test_linux_ipv6_kernel_routingTable():
             for ll in linklocals:
                 actual = actual.replace(ll[1], "fe80::__(%s)__" % ll[0])
             # Mask out protocol name or number
-            actual = re.sub(r" proto [0-9a-z]+ ", " proto XXXX ", actual)
+            actual = re.sub(r"[ ]+proto [0-9a-z]+ ", "  proto XXXX ", actual)
             # Remove ff00::/8 routes (seen on some kernels - not from FRR)
             actual = re.sub(r'ff00::/8.*', '', actual)