[asterisk-commits] Improve messages produced when core dumps or reference leaks... (testsuite[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat May 30 10:19:57 CDT 2015


Joshua Colp has submitted this change and it was merged.

Change subject: Improve messages produced when core dumps or reference leaks are detected.
......................................................................


Improve messages produced when core dumps or reference leaks are detected.

This updates the messages printed when a test produces a core dump
or when REF_DEBUG identifies a leak.  The log messages now tell you if
the test is failing because of the crash/leak, or if it had already failed
but also crashed/leaked.

Change-Id: I6c40e04d6935e606b162a116c1ce23e9a50ddaae
---
M runtests.py
1 file changed, 11 insertions(+), 4 deletions(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Verified



diff --git a/runtests.py b/runtests.py
index 971de7c..17d7ff7 100755
--- a/runtests.py
+++ b/runtests.py
@@ -116,8 +116,11 @@
 
             core_dumps = self._check_for_core()
             if (len(core_dumps)):
-                self.stdout_print("Core dumps detected; failing test")
-                self.passed = False
+                if self.passed:
+                    self.stdout_print("Core dumps detected; failing test")
+                    self.passed = False
+                else:
+                    self.stdout_print("Core dumps detected; test was already failed")
                 self._archive_core_dumps(core_dumps)
 
             self._process_valgrind()
@@ -282,8 +285,12 @@
                                      os.path.join(dest_dir, "refs.txt"))
                     hardlink_or_copy(refs_in,
                                      os.path.join(dest_dir, "refs"))
-                    self.stdout_print("REF_DEBUG identified leaks, mark test as failure")
-                    self.passed = False
+                    if self.passed:
+                        self.stdout_print("REF_DEBUG identified leaks, mark test as failure")
+                        self.passed = False
+                    else:
+                        self.stdout_print("REF_DEBUG identified leaks, "
+                                          "test was already marked as failure");
             i += 1
 
     def _archive_files(self, src_dir, dest_dir, *filenames):

-- 
To view, visit https://gerrit.asterisk.org/549
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6c40e04d6935e606b162a116c1ce23e9a50ddaae
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-commits mailing list