mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 18:38:28 -04:00
autotest: try harder to kill child processes
This commit is contained in:
parent
e32171b185
commit
016e84ee21
@ -73,7 +73,10 @@ def pexpect_autoclose(p):
|
|||||||
def pexpect_close(p):
|
def pexpect_close(p):
|
||||||
'''close a pexpect child'''
|
'''close a pexpect child'''
|
||||||
global close_list
|
global close_list
|
||||||
|
p.close()
|
||||||
|
time.sleep(1)
|
||||||
p.close(force=True)
|
p.close(force=True)
|
||||||
|
if p in close_list:
|
||||||
close_list.remove(p)
|
close_list.remove(p)
|
||||||
|
|
||||||
def pexpect_close_all():
|
def pexpect_close_all():
|
||||||
@ -81,11 +84,13 @@ def pexpect_close_all():
|
|||||||
global close_list
|
global close_list
|
||||||
for p in close_list[:]:
|
for p in close_list[:]:
|
||||||
try:
|
try:
|
||||||
|
p.close()
|
||||||
|
time.sleep(1)
|
||||||
p.close(Force=True)
|
p.close(Force=True)
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def start_SIL(atype, valgrind=True, wipe=False, CLI=False):
|
def start_SIL(atype, valgrind=False, wipe=False, CLI=False):
|
||||||
'''launch a SIL instance'''
|
'''launch a SIL instance'''
|
||||||
cmd=""
|
cmd=""
|
||||||
if valgrind and os.path.exists('/usr/bin/valgrind'):
|
if valgrind and os.path.exists('/usr/bin/valgrind'):
|
||||||
|
Loading…
Reference in New Issue
Block a user