summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/topotests/all-protocol-startup/test_all_protocol_startup.py4
-rwxr-xr-xtests/topotests/ospf6-topo1/test_ospf6_topo1.py12
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/topotests/all-protocol-startup/test_all_protocol_startup.py b/tests/topotests/all-protocol-startup/test_all_protocol_startup.py
index 16609221c1..a671e14e07 100755
--- a/tests/topotests/all-protocol-startup/test_all_protocol_startup.py
+++ b/tests/topotests/all-protocol-startup/test_all_protocol_startup.py
@@ -307,7 +307,7 @@ def test_converge_protocols():
expected = open(v4_routesFile).read().rstrip()
expected = ('\n'.join(expected.splitlines()) + '\n').splitlines(1)
- actual = net['r%s' %i].cmd('vtysh -c "show ip route" | /usr/bin/tail -n +7 | sort 2> /dev/null').rstrip()
+ actual = net['r%s' %i].cmd('vtysh -c "show ip route" | /usr/bin/tail -n +7 | env LC_ALL=en_US.UTF-8 sort 2> /dev/null').rstrip()
# Drop time in last update
actual = re.sub(r" [0-2][0-9]:[0-5][0-9]:[0-5][0-9]", " XX:XX:XX", actual)
actual = ('\n'.join(actual.splitlines()) + '\n').splitlines(1)
@@ -329,7 +329,7 @@ def test_converge_protocols():
expected = open(v6_routesFile).read().rstrip()
expected = ('\n'.join(expected.splitlines()) + '\n').splitlines(1)
- actual = net['r%s' %i].cmd('vtysh -c "show ipv6 route" | /usr/bin/tail -n +7 | sort 2> /dev/null').rstrip()
+ actual = net['r%s' %i].cmd('vtysh -c "show ipv6 route" | /usr/bin/tail -n +7 | env LC_ALL=en_US.UTF-8 sort 2> /dev/null').rstrip()
# Drop time in last update
actual = re.sub(r" [0-2][0-9]:[0-5][0-9]:[0-5][0-9]", " XX:XX:XX", actual)
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 cb0c4af221..2f7a4ce4e3 100755
--- a/tests/topotests/ospf6-topo1/test_ospf6_topo1.py
+++ b/tests/topotests/ospf6-topo1/test_ospf6_topo1.py
@@ -319,18 +319,18 @@ def test_linux_ipv6_kernel_routingTable():
# Now compare the routing tables (after substituting link-local addresses)
for i in range(1, 5):
- if topotest.version_cmp(platform.release(), '5.3') < 0:
+ # Actual output from router
+ actual = tgen.gears['r{}'.format(i)].run('ip -6 route').rstrip()
+ if "nhid" in actual:
+ refTableFile = os.path.join(CWD, 'r{}/ip_6_address.nhg.ref'.format(i))
+ else:
refTableFile = os.path.join(CWD, 'r{}/ip_6_address.ref'.format(i))
- else:
- refTableFile = os.path.join(CWD, 'r{}/ip_6_address.nhg.ref'.format(i))
- if os.path.isfile(refTableFile):
+ if os.path.isfile(refTableFile):
expected = open(refTableFile).read().rstrip()
# Fix newlines (make them all the same)
expected = ('\n'.join(expected.splitlines())).splitlines(1)
- # Actual output from router
- actual = tgen.gears['r{}'.format(i)].run('ip -6 route').rstrip()
# Mask out Link-Local mac addresses
for ll in linklocals:
actual = actual.replace(ll[1], "fe80::__(%s)__" % ll[0])