From efccfe2252a431433cf9fd54ad16ec2057b6969d Mon Sep 17 00:00:00 2001 From: Simon Lin Date: Sun, 27 Sep 2020 11:22:50 +0800 Subject: [PATCH] [scripts] fix test_route_table.py (#5558) --- tests/scripts/thread-cert/Makefile.am | 2 ++ tests/scripts/thread-cert/node.py | 4 ++-- tests/scripts/thread-cert/test_route_table.py | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/scripts/thread-cert/Makefile.am b/tests/scripts/thread-cert/Makefile.am index 46294f542..13e3e9f03 100644 --- a/tests/scripts/thread-cert/Makefile.am +++ b/tests/scripts/thread-cert/Makefile.am @@ -159,6 +159,7 @@ EXTRA_DIST = \ test_network_layer.py \ test_reed_address_solicit_rejected.py \ test_reset.py \ + test_route_table.py \ test_router_reattach.py \ test_service.py \ thread_cert.py \ @@ -205,6 +206,7 @@ check_SCRIPTS = \ test_network_layer.py \ test_reed_address_solicit_rejected.py \ test_reset.py \ + test_route_table.py \ test_router_reattach.py \ test_service.py \ Cert_5_1_01_RouterAttach.py \ diff --git a/tests/scripts/thread-cert/node.py b/tests/scripts/thread-cert/node.py index c6a19ff1a..849491455 100755 --- a/tests/scripts/thread-cert/node.py +++ b/tests/scripts/thread-cert/node.py @@ -1809,7 +1809,7 @@ class NodeImpl: self._expect([r'(\d+)((\s\d+)*)']) g = self.pexpect.match.groups() - router_list = g[0] + ' ' + g[1] + router_list = g[0].decode('utf8') + ' ' + g[1].decode('utf8') router_list = [int(x) for x in router_list.split()] self._expect('Done') return router_list @@ -1820,7 +1820,7 @@ class NodeImpl: self._expect(r'(.*)Done') g = self.pexpect.match.groups() - output = g[0] + output = g[0].decode('utf8') lines = output.strip().split('\n') lines = [l.strip() for l in lines] router_table = {} diff --git a/tests/scripts/thread-cert/test_route_table.py b/tests/scripts/thread-cert/test_route_table.py index 1db0f8bba..8a8aadc7a 100755 --- a/tests/scripts/thread-cert/test_route_table.py +++ b/tests/scripts/thread-cert/test_route_table.py @@ -41,6 +41,8 @@ ROUTER2 = 3 class TestRouteTable(thread_cert.TestCase): + SUPPORT_NCP = False + TOPOLOGY = { LEADER: { 'mode': 'rsdn',