From 743ed05367eec6d7e38d2a190f93167e1724ae30 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 6 Jul 2021 15:53:19 +1000 Subject: [PATCH] autotest: detect ap-*.core as we do core.* files --- Tools/autotest/autotest.py | 2 +- Tools/autotest/common.py | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Tools/autotest/autotest.py b/Tools/autotest/autotest.py index 8922438048..12e2551e01 100755 --- a/Tools/autotest/autotest.py +++ b/Tools/autotest/autotest.py @@ -701,7 +701,7 @@ def run_tests(steps): diagnostic_files = [] for p in "dumpstack.sh_*", "dumpcore.sh_*", "autotest-*tlog": - diagnostic_files.extend(glob.glob()) + diagnostic_files.extend(glob.glob(p)) if diagnostic_files: print('Removing diagnostic files: %s' % str(diagnostic_files)) for f in diagnostic_files: diff --git a/Tools/autotest/common.py b/Tools/autotest/common.py index be3b801e75..82bea49487 100644 --- a/Tools/autotest/common.py +++ b/Tools/autotest/common.py @@ -5766,7 +5766,10 @@ Also, ignores heartbeats not from our target system''' shutil.move(log, newname) # move core files save_binaries = False - for log in sorted(glob.glob("core*")): + corefiles = [] + corefiles.extend(glob.glob("core*")) + corefiles.extend(glob.glob("ap-*.core")) + for log in sorted(corefiles): bname = os.path.basename(log) newname = os.path.join(to_dir, "%s-%s-%s" % (bname, self.log_name(), name)) print("Renaming %s to %s" % (log, newname)) @@ -5873,7 +5876,9 @@ Also, ignores heartbeats not from our target system''' util.pexpect_close(self._mavproxy) self._mavproxy = None - corefiles = glob.glob("core*") + corefiles = [] + corefiles.extend(glob.glob("core*")) + corefiles.extend(glob.glob("ap-*.core")) if corefiles: self.progress('Corefiles detected: %s' % str(corefiles)) passed = False @@ -8785,7 +8790,7 @@ switch value''' self.progress("Failed with timeout") self.fail_list.append(["Failed with timeout", None, None]) if self.logs_dir: - if glob.glob("core*"): + if glob.glob("core*") or glob.glob("ap-*.core"): self.check_logs("FRAMEWORK") if self.rc_thread is not None: