<p>George Joseph <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6223">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Jenkins2: Verified
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">runtests.py: Add --stop-on-error<br><br>--stop-on-error: Stop the testsuite if a test fails. Useful for<br>troubleshooting.<br><br>Change-Id: Ide7878a1611987050166b1ccd982bd618395c3ed<br>---<br>M runtests.py<br>1 file changed, 8 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/runtests.py b/runtests.py<br>index b73d5af..a6a80f6 100755<br>--- a/runtests.py<br>+++ b/runtests.py<br>@@ -583,6 +583,7 @@<br> self.start_time = time.strftime("%Y-%m-%dT%H:%M:%S %Z", time.localtime())<br> test_suite_dir = os.getcwd()<br> i = 0<br>+ global abandon_test_suite<br> for t in self.tests:<br> if t.can_run is False:<br> continue<br>@@ -666,6 +667,8 @@<br> self.total_time += t.time<br> if t.passed is False:<br> self.total_failures += 1<br>+ if self.options.stop_on_error:<br>+ abandon_test_suite = True<br> <br> def __strip_illegal_xml_chars(self, data):<br> """<br>@@ -781,6 +784,8 @@<br> if argv is None:<br> args = sys.argv<br> <br>+ global abandon_test_suite<br>+<br> usage = "Usage: ./runtests.py [options]"<br> <br> parser = optparse.OptionParser(usage=usage)<br>@@ -846,6 +851,9 @@<br> parser.add_option("--timeout", metavar='int', type=int,<br> dest="timeout", default=-1,<br> help="Abort test after n seconds of no output.")<br>+ parser.add_option("--stop-on-error", action="store_true",<br>+ dest="stop_on_error", default=False,<br>+ help="Stops the testsuite when a test fails.")<br> (options, args) = parser.parse_args(argv)<br> <br> # Install a signal handler for USR1/TERM, and use it to bail out of running<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6223">change 6223</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/6223"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ide7878a1611987050166b1ccd982bd618395c3ed </div>
<div style="display:none"> Gerrit-Change-Number: 6223 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>