spinel-cli: Clean exit (#585)

* spinel-cli: Use new clean eof termination of ot-ncp rather than CTRL+C.

* Add coverage to NCP.
This commit is contained in:
Martin Turon
2016-09-13 18:47:57 -07:00
committed by Jonathan Hui
parent 09484288ed
commit 84079beb3a
2 changed files with 3 additions and 6 deletions
+2 -5
View File
@@ -98,11 +98,8 @@ class Node:
def __del__(self):
if self.pexpect.isalive():
if self.node_type == 'sim':
self.send_command('exit')
self.pexpect.expect(pexpect.EOF)
elif self.node_type == 'ncp-sim':
self.pexpect.sendcontrol('c');
self.send_command('exit')
self.pexpect.expect(pexpect.EOF)
self.pexpect.terminate()
self.pexpect.close(force=True)