mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 14:34:22 +00:00
tests: Fix regex complaints by python3
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
8a8fd10a47
commit
37076cae05
@ -169,7 +169,7 @@ def test_bgp_converge():
|
|||||||
for i in range(1, 2):
|
for i in range(1, 2):
|
||||||
for view in range(1, 4):
|
for view in range(1, 4):
|
||||||
notConverged = tgen.net["r%s" % i].cmd(
|
notConverged = tgen.net["r%s" % i].cmd(
|
||||||
'vtysh -c "show ip bgp view %s summary" 2> /dev/null | grep ^[0-9] | grep -vP " 11\s+(\d+)"'
|
r'vtysh -c "show ip bgp view %s summary" 2> /dev/null | grep ^[0-9] | grep -vP " 11\s+(\d+)"'
|
||||||
% view
|
% view
|
||||||
)
|
)
|
||||||
if notConverged:
|
if notConverged:
|
||||||
|
@ -41,7 +41,7 @@ pytestmark = [pytest.mark.bgpd]
|
|||||||
|
|
||||||
|
|
||||||
def build_topo(tgen):
|
def build_topo(tgen):
|
||||||
"""
|
r"""
|
||||||
CE1 CE3 CE5
|
CE1 CE3 CE5
|
||||||
(eth0) (eth0) (eth0)
|
(eth0) (eth0) (eth0)
|
||||||
:2 :2 :2
|
:2 :2 :2
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
# OF THIS SOFTWARE.
|
# OF THIS SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
"""
|
r"""
|
||||||
test_ospf6_ecmp_inter_area.py: Test OSPFv3 ECMP inter-area nexthop update
|
test_ospf6_ecmp_inter_area.py: Test OSPFv3 ECMP inter-area nexthop update
|
||||||
|
|
||||||
Check proper removal of ECMP nexthops after a path used by one nexthop
|
Check proper removal of ECMP nexthops after a path used by one nexthop
|
||||||
|
@ -158,7 +158,7 @@ def route_install_helper(iter):
|
|||||||
|
|
||||||
# Avoid top ecmp case for runs with < 4G memory
|
# Avoid top ecmp case for runs with < 4G memory
|
||||||
output = tgen.net.cmd_raises("free")
|
output = tgen.net.cmd_raises("free")
|
||||||
m = re.search("Mem:\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)", output)
|
m = re.search(r"Mem:\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)", output)
|
||||||
total_mem = int(m.group(2))
|
total_mem = int(m.group(2))
|
||||||
if total_mem < 4000000 and iter == 5:
|
if total_mem < 4000000 and iter == 5:
|
||||||
logger.info(
|
logger.info(
|
||||||
|
Loading…
Reference in New Issue
Block a user