mirror of https://github.com/nirenjan/libx52.git
Close command socket in test harness before terminating daemon
parent
611bc9d965
commit
251ccfde0d
|
@ -127,6 +127,11 @@ class Test:
|
||||||
if self.daemon is None:
|
if self.daemon is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# Close the command socket and wait 2 seconds for the daemon
|
||||||
|
# to deregister the client
|
||||||
|
self.cmdsock.close()
|
||||||
|
time.sleep(2)
|
||||||
|
|
||||||
# Send a SIGTERM to the daemon
|
# Send a SIGTERM to the daemon
|
||||||
os.kill(self.daemon.pid, signal.SIGTERM)
|
os.kill(self.daemon.pid, signal.SIGTERM)
|
||||||
try:
|
try:
|
||||||
|
@ -136,7 +141,6 @@ class Test:
|
||||||
self.daemon.kill()
|
self.daemon.kill()
|
||||||
finally:
|
finally:
|
||||||
self.daemon = None
|
self.daemon = None
|
||||||
self.cmdsock.close()
|
|
||||||
|
|
||||||
def append(self, testcase):
|
def append(self, testcase):
|
||||||
"""Add one testcase to the test case list"""
|
"""Add one testcase to the test case list"""
|
||||||
|
|
Loading…
Reference in New Issue