diff --git a/Tools/autotest/arducopter.py b/Tools/autotest/arducopter.py index 2e0807a088..92ec25adc5 100644 --- a/Tools/autotest/arducopter.py +++ b/Tools/autotest/arducopter.py @@ -319,6 +319,8 @@ def fly_ArduCopter(): hquad.close() 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("../bin/gpxtokml") + " " + util.reltopdir("../buildlogs/ArduCopter-test.mavlog.gpx")) diff --git a/Tools/autotest/util.py b/Tools/autotest/util.py index f08421044f..dbd8873322 100644 --- a/Tools/autotest/util.py +++ b/Tools/autotest/util.py @@ -50,7 +50,7 @@ def build_SIL(atype): def start_SIL(atype): '''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) ret.expect('Waiting for connection') return ret