From: Martin Winter Date: Thu, 26 Oct 2017 00:56:33 +0000 (-0700) Subject: Fix output to allow it on generic Debian X-Git-Tag: frr-7.1-dev~151^2~203 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=dd3ddc066353c614f43cb91f08a9fa473fa538c6;p=mirror%2Ffrr.git Fix output to allow it on generic Debian - Generic Debian only has a single space in front of “proto” in the linux shell routing outptu Signed-off-by: Martin Winter --- diff --git a/tests/topotests/ldp-topo1/test_ldp_topo1.py b/tests/topotests/ldp-topo1/test_ldp_topo1.py index 818e64723e..c8ea438cce 100755 --- a/tests/topotests/ldp-topo1/test_ldp_topo1.py +++ b/tests/topotests/ldp-topo1/test_ldp_topo1.py @@ -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) diff --git a/tests/topotests/ospf6-topo1/test_ospf6_topo1.py b/tests/topotests/ospf6-topo1/test_ospf6_topo1.py index 2c49dff23b..fd65699e7f 100755 --- a/tests/topotests/ospf6-topo1/test_ospf6_topo1.py +++ b/tests/topotests/ospf6-topo1/test_ospf6_topo1.py @@ -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)