[asterisk-commits] wdoekes: testsuite/asterisk/trunk r4677 - /asterisk/trunk/runtests.py
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Feb 10 10:14:24 CST 2014
Author: wdoekes
Date: Mon Feb 10 10:14:20 2014
New Revision: 4677
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4677
Log:
Don't continue if we cannot kill a (root?) running asterisk.
Review: https://reviewboard.asterisk.org/r/3198/
Modified:
asterisk/trunk/runtests.py
Modified: asterisk/trunk/runtests.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/runtests.py?view=diff&rev=4677&r1=4676&r2=4677
==============================================================================
--- asterisk/trunk/runtests.py (original)
+++ asterisk/trunk/runtests.py Mon Feb 10 10:14:20 2014
@@ -302,9 +302,15 @@
# Establish Preconditions
print "Making sure Asterisk isn't running ..."
- os.system("killall -9 asterisk > /dev/null 2>&1")
+ 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..."
- os.system("killall -9 sipp > /dev/null 2>&1")
+ 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