[Buildbot-commits] buildbot/buildbot/scripts runner.py,1.26,1.27
Brian Warner
warner at users.sourceforge.net
Sun May 22 01:44:21 UTC 2005
Update of /cvsroot/buildbot/buildbot/buildbot/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3211/buildbot/scripts
Modified Files:
runner.py
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-212
Creator: Brian Warner <warner at monolith.lothar.com>
fix some bugs in several 'buildbot' subcommands
* buildbot/scripts/runner.py (run): call sendchange(), not
do_sendchange(): thus 'buildbot sendchange' was broken in 0.6.5
(run): call stop("HUP"), not "-HUP", 'buildbot stop' was broken.
(stop): don't wait for process to die when sending SIGHUP
(masterTAC): use a rawstring for basedir=, otherwise '\' in the
directory name gets interpreted, which you don't want
(slaveTAC): same
* buildbot/__init__.py (version): bump to 0.6.5+ while between
releases
Index: runner.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/scripts/runner.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- runner.py 18 May 2005 02:21:29 -0000 1.26
+++ runner.py 22 May 2005 01:44:19 -0000 1.27
@@ -194,8 +194,8 @@
from twisted.application import service
from buildbot.master import BuildMaster
-basedir = '%(basedir)s'
-configfile = '%(config)s'
+basedir = r'%(basedir)s'
+configfile = r'%(config)s'
application = service.Application('buildmaster')
BuildMaster(basedir, configfile).setServiceParent(application)
@@ -263,7 +263,7 @@
from twisted.application import service
from buildbot.slave.bot import BuildSlave
-basedir = '%(basedir)s'
+basedir = r'%(basedir)s'
host = '%(host)s'
port = %(port)d
slavename = '%(name)s'
@@ -335,7 +335,7 @@
run()
-def stop(config, signame="TERM"):
+def stop(config, signame="TERM", wait=False):
import signal
basedir = config['basedir']
quiet = config['quiet']
@@ -345,6 +345,9 @@
signum = getattr(signal, "SIG"+signame)
timer = 0
os.kill(pid, signum)
+ if not wait:
+ print "sent SIG%s to process" % signame
+ return
time.sleep(0.1)
while timer < 5:
# poll once per second until twistd.pid goes away, up to 5 seconds
@@ -609,11 +612,11 @@
elif command == "start":
start(so)
elif command == "stop":
- stop(so)
+ stop(so, wait=True)
elif command == "sighup":
- stop(so, "-HUP")
+ stop(so, "HUP")
elif command == "sendchange":
- do_sendchange(so, True)
+ sendchange(so, True)
elif command == "debugclient":
debugclient(so)
elif command == "statuslog":
More information about the Commits
mailing list