[Buildbot-devel] ShellCommand on windows7 slave does nothing

John Stile john at stilen.com
Fri Oct 5 02:21:56 UTC 2012


On Thu, 2012-10-04 at 14:14 -0700, John Stile wrote:
> Migrating a slave from WinXp (32bit) to Win7 (64bit), I find my
> ShellCommand returns immediately without any output, and program
> finished with exit code 1.
> 
> My slave is started from cygwin (buildbot is installed in cygwin and
> started from cygiwn).
> 
> twistd.log on master and slave show they are talking, and the slave log
> shows the ShellCommand string was received.
> 
> I see no output, save the environment variables and the issued command.
> I modified my command to run just pwd, but nothing is output.
> I modified my command to touch a file, but no file is created.
> So I don't think the command is executed on the slave.
> 
> How can I debug this?  
> Is there a windows7 problem?
> Any advice is very much appreciated.
> 
> slave Buildbot version: 0.7.6, Twisted version: 2.5.0
> master Buildbot version: 0.7.9, Twisted version: 8.1.0
> 
> My master.cfg looks like this (removing extraneous stuff):
> from os import system
> from commands import getoutput
> from buildbot.steps import source, shell
> from buildbot.process import factory
> from buildbot.process.properties import WithProperties
> c = BuildmasterConfig = {}
> c['slaves'] = [
>   BuildSlave("buildxp2.mydomain.com", "foodles"),
>   BuildSlave("buildwin3.mydomain.com", "foodles"),
> ]
> c['slavePortnum'] = 9989
> c['change_source'] = []
> d = factory.BuildFactory()
> d.addStep(
>   shell.ShellCommand(
>     command=[ "touch", 'foodles.txt'],
>     description=["Building Win"],
>     descriptionDone=["Built Win"]
>   )
> )
> c['builders'] = [
> {'name':'win_europa',
>  'slavename':'buildwin3.mydomain.com',
>  'builddir':'Europa_win',
>  'factory':d },
> ]  
> 
> slave twisted.log
> 2012/10/04 13:34 -0700 [Broker,client]   argv: ['touch', 'foodles.txt']
> 2012/10/04 13:34 -0700 [Broker,client]  environment: {'TMP': '/tmp', 'PSModulePath': 'C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\', 'HISTFILE': '/home/build/.history', 'USERDOMAIN': 'BUILDWIN3', 'VS100COMNTOOLS': 'c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\Tools\\', 'XTERM_SHELL': '/bin/bash', 'COMPUTERNAME': 'BUILDWIN3', 'COMMONPROGRAMFILES': 'C:\\Program Files (x86)\\Common Files', 'PROCESSOR_IDENTIFIER': 'Intel64 Family 6 Model 44 Stepping 2, GenuineIntel', 'LOGNAME': 'build', 'USER': 'build', 'PROCESSOR_REVISION': '2c02', 'HOME': '/home/build', 'PATH': '/usr/local/bin:/usr/bin:/cygdrive/c/strawberry/c/bin:/cygdrive/c/strawberry/perl/site/bin:/cygdrive/c/strawberry/perl/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/DTS/Binn:/cygdrive/c/Python27:/cygdrive/c/Program Files (x86)/Git/bin:/usr/lib/lapack:/cygdrive/c/Program Files/Git/bin:/cygdrive/c/Program Files/Git/bin', 'CYGWIN': 'binmode ntsec', 'DISPLAY': ':0', 'tmp': 'C:\\Users\\build\\AppData\\Local\\Temp', 'INFOPATH': '/usr/local/info:/usr/share/info:/usr/info:', 'TERM': 'xterm', 'SHELL': '/bin/bash', 'TZ': 'America/Los_Angeles', 'XAUTHORITY': '/home/build/.Xauthority', 'XLIB_SKIP_ARGB_VISUALS': '1', 'ProgramData': 'C:\\ProgramData', 'SHLVL': '3', 'CommonProgramFiles(x86)': 'C:\\Program Files (x86)\\Common Files', 'PROCESSOR_ARCHITECTURE': 'x86', 'HISTSIZE': '1000', 'ALLUSERSPROFILE': 'C:\\ProgramData', 'WINDOWID': '6291491', 'ProgramFiles(x86)': 'C:\\Program Files (x86)', 'EDITOR': 'vi', 'MANPATH': '/usr/local/man:/usr/share/man:/usr/man::/usr/ssl/man', 'HOMEPATH': '\\Users\\build', 'FP_NO_HOST_CHECK': 'NO', 'HISTFILESIZE': '1000', 'ProgramW6432': 'C:\\Program Files', 'USERNAME': 'build', 'LANG': 'en_US.UTF-8', 'LOGONSERVER': '\\\\BUILDWIN3', 'SYSTEMROOT': 'C:\\Windows', 'COMSPEC': 'C:\\Windows\\system32\\cmd.exe', 'CYGWINBASE': 'C:\\cygwin', 'LOCALAPPDATA': 'C:\\Users\\build\\AppData\\Local', 'XTERM_VERSION': 'XTerm(281)', 'PRINTER': 'Microsoft XPS Document Writer', 'XTERM_LOCALE': 'en_US.UTF-8', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC', 'CommonProgramW6432': 'C:\\Program Files\\Common Files', '_': '/usr/bin/buildbot', 'SESSIONNAME': 'RDP-Tcp#0', 'CLIENTNAME': 'genx', 'WINDIR': 'C:\\Windows', 'TEMP': '/tmp', 'HOMEDRIVE': 'C:', 'SYSTEMDRIVE': 'C:', 'HOSTNAME': 'BUILDWIN3', 'NUMBER_OF_PROCESSORS': '4', 'APPDATA': 'C:\\Users\\build\\AppData\\Roaming', 'PWD': '/home/build', 'PROCESSOR_LEVEL': '6', 'temp': 'C:\\Users\\build\\AppData\\Local\\Temp', 'PROCESSOR_ARCHITEW6432': 'AMD64', 'USERPROFILE': 'C:\\Users\\build', 'OS': 'Windows_NT', 'PUBLIC': 'C:\\Users\\Public', 'PROGRAMFILES': 'C:\\Program Files (x86)'}
> 2012/10/04 13:34 -0700 [-] command finished with signal None, exit code 1
> 2012/10/04 13:34 -0700 [-] SlaveBuilder.commandComplete <buildbot.slave.commands.SlaveShellCommand instance at 0xffc01dac>
> 
On the Windows side I modified
/usr/lib/python2.6/site-packages/buildbot/slave/commands.py
  Added to SlaveShellCommand.start()
  printing to a file:

f=open('foodles.txt','w')
f.write( "In buildbot.slave.commands.py SlaveShellCommand.start()\n" )
f.write( "%s" % args )
f.close()

And I tried to build.
The file is created in /home/build/Buildbot_slave/foodles.txt
The file contains:
In buildbot.slave.commands.py SlaveShellCommand.start()
{'workdir': 'build', 'env': None, 'want_stderr': 1, 'logfiles': {},
'command': ['touch', 'foodles.txt'], 'timeout': 1200, 'want_stdout': 1}

I guess I'll continue down this route.





More information about the devel mailing list