mirror of
https://github.com/espressif/openthread.git
synced 2026-07-28 14:47:46 +00:00
[test] support full log (#4071)
This is useful when more logs are enabled and the logs contain "leader", "child", "router" or "leader".
This commit is contained in:
@@ -476,11 +476,11 @@ class Node:
|
||||
self._expect('Done')
|
||||
|
||||
def get_state(self):
|
||||
states = ['detached', 'child', 'router', 'leader']
|
||||
states = [r'\ndetached', r'\nchild', r'\nrouter', r'\nleader']
|
||||
self.send_command('state')
|
||||
match = self._expect(states)
|
||||
self._expect('Done')
|
||||
return states[match]
|
||||
return states[match].strip(r'\n')
|
||||
|
||||
def set_state(self, state):
|
||||
cmd = 'state %s' % state
|
||||
|
||||
Reference in New Issue
Block a user