mirror of https://github.com/ArduPilot/ardupilot
autotest: run SIL binary under valgrind
this lets us find uninitialised variables in the APM code, and other common C/C++ errors
This commit is contained in:
parent
cfe6e333c9
commit
76985029dd
|
@ -319,6 +319,8 @@ def fly_ArduCopter():
|
||||||
hquad.close()
|
hquad.close()
|
||||||
|
|
||||||
shutil.copy(logfile, util.reltopdir("../buildlogs/ArduCopter-test.mavlog"))
|
shutil.copy(logfile, util.reltopdir("../buildlogs/ArduCopter-test.mavlog"))
|
||||||
|
if os.path.exists('ArduCopter-valgrind.log'):
|
||||||
|
shutil.copy("ArduCopter-valgrind.log", util.reltopdir("../buildlogs/ArduCopter-valgrind.log"))
|
||||||
util.run_cmd(util.reltopdir("../pymavlink/examples/mavtogpx.py") + " " + util.reltopdir("../buildlogs/ArduCopter-test.mavlog"))
|
util.run_cmd(util.reltopdir("../pymavlink/examples/mavtogpx.py") + " " + util.reltopdir("../buildlogs/ArduCopter-test.mavlog"))
|
||||||
util.run_cmd(util.reltopdir("../bin/gpxtokml") + " " + util.reltopdir("../buildlogs/ArduCopter-test.mavlog.gpx"))
|
util.run_cmd(util.reltopdir("../bin/gpxtokml") + " " + util.reltopdir("../buildlogs/ArduCopter-test.mavlog.gpx"))
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ def build_SIL(atype):
|
||||||
|
|
||||||
def start_SIL(atype):
|
def start_SIL(atype):
|
||||||
'''launch a SIL instance'''
|
'''launch a SIL instance'''
|
||||||
ret = pexpect.spawn(reltopdir('tmp/%s.build/%s.elf' % (atype, atype)),
|
ret = pexpect.spawn(('valgrind -q --log-file=%s-valgrind.log ' % atype) + reltopdir('tmp/%s.build/%s.elf' % (atype, atype)),
|
||||||
logfile=sys.stdout, timeout=5)
|
logfile=sys.stdout, timeout=5)
|
||||||
ret.expect('Waiting for connection')
|
ret.expect('Waiting for connection')
|
||||||
return ret
|
return ret
|
||||||
|
|
Loading…
Reference in New Issue