[Asterisk-code-review] runtests.py: Add --stop-on-error (testsuite[master])

George Joseph asteriskteam at digium.com
Fri Aug 11 10:42:10 CDT 2017


George Joseph has uploaded this change for review. ( https://gerrit.asterisk.org/6223


Change subject: runtests.py:  Add --stop-on-error
......................................................................

runtests.py:  Add --stop-on-error

--stop-on-error:  Stop the testsuite if a test fails.  Useful for
troubleshooting.

Change-Id: Ide7878a1611987050166b1ccd982bd618395c3ed
---
M runtests.py
1 file changed, 5 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/23/6223/1

diff --git a/runtests.py b/runtests.py
index b73d5af..1083a50 100755
--- a/runtests.py
+++ b/runtests.py
@@ -666,6 +666,8 @@
             self.total_time += t.time
             if t.passed is False:
                 self.total_failures += 1
+                if self.options.stop_on_error:
+                    break
 
     def __strip_illegal_xml_chars(self, data):
         """
@@ -846,6 +848,9 @@
     parser.add_option("--timeout", metavar='int', type=int,
                       dest="timeout", default=-1,
                       help="Abort test after n seconds of no output.")
+    parser.add_option("--stop-on-error", action="store_true",
+                      dest="stop_on_error", default=False,
+                      help="Stops the testsuite when a test fails.")
     (options, args) = parser.parse_args(argv)
 
     # Install a signal handler for USR1/TERM, and use it to bail out of running

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

Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide7878a1611987050166b1ccd982bd618395c3ed
Gerrit-Change-Number: 6223
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170811/2a55496f/attachment.html>


More information about the asterisk-code-review mailing list