[Buildbot-commits] buildbot/buildbot/slave commands.py,1.26,1.27

Brian Warner warner at users.sourceforge.net
Tue Apr 26 21:37:19 UTC 2005


Update of /cvsroot/buildbot/buildbot/buildbot/slave
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28679/buildbot/slave

Modified Files:
	commands.py 
Log Message:
(ShellCommand._startCommand): prepend 'cmd.exe' (or rather
os.environ['COMSPEC']) to the argv list when running under windows. This
appears to be the best way to allow BuildSteps to do something normal like
'trial -v buildbot.test' or 'make foo' and still expect it to work. The idea
is to make the BuildSteps look as much like what a developer would type when
compiling or testing the tree by hand. This approach probably has problems
when there are spaces in the arguments, so if you've got windows buildslaves,
you'll need to pay close attention to your commands.


Index: commands.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/slave/commands.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- commands.py	24 Apr 2005 21:30:27 -0000	1.26
+++ commands.py	26 Apr 2005 21:37:16 -0000	1.27
@@ -163,7 +163,10 @@
                 # hurt to try
                 argv = ['/bin/sh', '-c', self.command]
         else:
-            argv = self.command
+            if runtime.platformType  == 'win32':
+                argv = [os.environ['COMSPEC'], '/c'] + list(self.command)
+            else:
+                argv = self.command
 
         # self.stdin is handled in ShellCommandPP.connectionMade
 





More information about the Commits mailing list