Skip to content

Commit

Permalink
autotest: detect ap-*.core as we do core.* files
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Jul 8, 2021
1 parent fd803dd commit 743ed05
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Tools/autotest/autotest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
11 changes: 8 additions & 3 deletions Tools/autotest/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -5766,7 +5766,10 @@ def check_logs(self, name):
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))
Expand Down Expand Up @@ -5873,7 +5876,9 @@ def run_one_test_attempt(self, test, interact=False, attempt=1, do_fail_list=Tru
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
Expand Down Expand Up @@ -8785,7 +8790,7 @@ def run_tests(self, tests):
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:
Expand Down

0 comments on commit 743ed05

Please sign in to comment.