From 1f8db08dab7d478ac24f575699fc9d817399a5e0 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 15 Dec 2018 16:22:36 +1100 Subject: [PATCH] Tools: autotest: show test output filename in summary --- Tools/autotest/common.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Tools/autotest/common.py b/Tools/autotest/common.py index d5ba615189..364df03f2d 100644 --- a/Tools/autotest/common.py +++ b/Tools/autotest/common.py @@ -1446,7 +1446,7 @@ class AutoTest(ABC): test_function() except Exception as e: self.progress('FAILED: "%s": %s' % (desc, repr(e))) - self.fail_list.append((desc, e)) + self.fail_list.append((desc, e, None)) if interact: self.progress("Starting MAVProxy interaction as directed") self.mavproxy.interact() @@ -1472,7 +1472,7 @@ class AutoTest(ABC): self.context_pop() self.progress('FAILED: "%s": %s (see %s)' % (prettyname, repr(e), test_output_filename)) - self.fail_list.append((prettyname, e)) + self.fail_list.append((prettyname, e, test_output_filename)) if interact: self.progress("Starting MAVProxy interaction as directed") self.mavproxy.interact() @@ -1936,11 +1936,14 @@ class AutoTest(ABC): except pexpect.TIMEOUT: self.progress("Failed with timeout") - self.fail_list.append("Failed with timeout") + self.fail_list.append(["Failed with timeout", None, None]) self.close() if len(self.fail_list): - self.progress("FAILED: %s" % self.fail_list) + self.progress("Failing tests:") + for failure in self.fail_list: + (desc, exception, debug_filename) = failure + print(" %s (%s) (see %s)" % (desc, exception, debug_filename)) return False return True