[asterisk-commits] mjordan: testsuite/asterisk/trunk r5963 - /asterisk/trunk/runtests.py

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Nov 19 12:28:41 CST 2014


Author: mjordan
Date: Wed Nov 19 12:28:39 2014
New Revision: 5963

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=5963
Log:
runtests.py: Don't completely bail on the script if unable to kill processes

Exiting the script completely when unable to kill Asterisk or SIPp is bad for
a few reasons:
(1) We get little to no output from the build agents when this occurs.
(2) os.system's return value is system dependent. Hence, this could return
    something other than 0 on success.
(3) Even if we can't kill a runaway Asterisk or SIPp process, that is no
    guarantee that subsequent tests will fail. Attempting to purge them before
    a run is a good thing; giving up if that doesn't work is not necessarily
    better than trying anyway.

Modified:
    asterisk/trunk/runtests.py

Modified: asterisk/trunk/runtests.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/runtests.py?view=diff&rev=5963&r1=5962&r2=5963
==============================================================================
--- asterisk/trunk/runtests.py (original)
+++ asterisk/trunk/runtests.py Wed Nov 19 12:28:39 2014
@@ -416,12 +416,10 @@
                 if os.system("if pidof asterisk >/dev/null; then killall -9 asterisk >/dev/null 2>&1; "
                          "sleep 1; ! pidof asterisk >/dev/null; fi"):
                     print "Could not kill asterisk."
-                    sys.exit(1)
                 print "Making sure SIPp isn't running..."
                 if os.system("if pidof sipp >/dev/null; then killall -9 sipp >/dev/null 2>&1; "
                          "sleep 1; ! pidof sipp >/dev/null; fi"):
                     print "Could not kill sipp."
-                    sys.exit(1)
                 # XXX TODO Hard coded path, gross.
                 os.system("rm -f /var/run/asterisk/asterisk.ctl")
                 os.system("rm -f /var/run/asterisk/asterisk.pid")




More information about the asterisk-commits mailing list