mirror of https://github.com/ArduPilot/ardupilot
autotest: fold close method into sole caller
we're missing the non-zero-valgrind-logs-means-failure check somehow
This commit is contained in:
parent
513938b0ff
commit
ac7629c546
|
@ -3191,26 +3191,6 @@ class TestSuite(ABC):
|
||||||
util.pexpect_close(self.sitl)
|
util.pexpect_close(self.sitl)
|
||||||
self.sitl = None
|
self.sitl = None
|
||||||
|
|
||||||
def close(self):
|
|
||||||
"""Tidy up after running all tests."""
|
|
||||||
|
|
||||||
if self.mav is not None:
|
|
||||||
self.mav.close()
|
|
||||||
self.mav = None
|
|
||||||
self.stop_SITL()
|
|
||||||
|
|
||||||
valgrind_log = util.valgrind_log_filepath(binary=self.binary,
|
|
||||||
model=self.frame)
|
|
||||||
files = glob.glob("*" + valgrind_log)
|
|
||||||
for valgrind_log in files:
|
|
||||||
os.chmod(valgrind_log, 0o644)
|
|
||||||
if os.path.getsize(valgrind_log) > 0:
|
|
||||||
target = self.buildlogs_path("%s-%s" % (
|
|
||||||
self.log_name(),
|
|
||||||
os.path.basename(valgrind_log)))
|
|
||||||
self.progress("Valgrind log: moving %s to %s" % (valgrind_log, target))
|
|
||||||
shutil.move(valgrind_log, target)
|
|
||||||
|
|
||||||
def start_test(self, description):
|
def start_test(self, description):
|
||||||
self.progress("##################################################################################")
|
self.progress("##################################################################################")
|
||||||
self.progress("########## %s ##########" % description)
|
self.progress("########## %s ##########" % description)
|
||||||
|
@ -11833,7 +11813,24 @@ switch value'''
|
||||||
self.rc_thread_should_quit = True
|
self.rc_thread_should_quit = True
|
||||||
self.rc_thread.join()
|
self.rc_thread.join()
|
||||||
self.rc_thread = None
|
self.rc_thread = None
|
||||||
self.close()
|
|
||||||
|
if self.mav is not None:
|
||||||
|
self.mav.close()
|
||||||
|
self.mav = None
|
||||||
|
|
||||||
|
self.stop_SITL()
|
||||||
|
|
||||||
|
valgrind_log = util.valgrind_log_filepath(binary=self.binary,
|
||||||
|
model=self.frame)
|
||||||
|
files = glob.glob("*" + valgrind_log)
|
||||||
|
for valgrind_log in files:
|
||||||
|
os.chmod(valgrind_log, 0o644)
|
||||||
|
if os.path.getsize(valgrind_log) > 0:
|
||||||
|
target = self.buildlogs_path("%s-%s" % (
|
||||||
|
self.log_name(),
|
||||||
|
os.path.basename(valgrind_log)))
|
||||||
|
self.progress("Valgrind log: moving %s to %s" % (valgrind_log, target))
|
||||||
|
shutil.move(valgrind_log, target)
|
||||||
|
|
||||||
return result_list
|
return result_list
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue