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
ac4beffab5
commit
c0f8ba1d1d
|
@ -3017,26 +3017,6 @@ class TestSuite(ABC):
|
|||
util.pexpect_close(self.sitl)
|
||||
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):
|
||||
self.progress("##################################################################################")
|
||||
self.progress("########## %s ##########" % description)
|
||||
|
@ -11656,7 +11636,24 @@ switch value'''
|
|||
self.rc_thread_should_quit = True
|
||||
self.rc_thread.join()
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue