[Buildbot-devel] Problems/Bug(?) with WithProperties on windows
Ian Bell
ian.h.bell at gmail.com
Fri Aug 8 06:50:31 UTC 2014
I stayed up super late last night pulling my hair out trying to get an
interpolate step to work, and now I am not convinced that there isn't a bug
in buildbot somewhere. In my code I have something like
from buildbot.process.properties import WithProperties
# Was the build started from the force build form with a "fullclean"
# property set? If so, clobber the checkout folders.
if platform.startswith('win'):
cmd = ['cmd', '/c', WithProperties('if %(fullclean:-no)s == no (del
/q *) ')]
else:
cmd = ['bash', '-c',
WithProperties('if [ %(fullclean:-no)s == yes ]; then echo pwd;
rm -rfv *; echo fully cleaned; fi'),
]
factory.addStep(ShellCommand(command=cmd, description='fullclean?',
workdir=""))
which works fine on linux/OSX, but fails on windows. When this runs on
windows, I get the traceback err.txt of
Traceback (most recent call last):
Failure: twisted.internet.defer.FirstError: FirstError[#12, [Failure
instance: Traceback (failure with no frames): <class
'twisted.internet.defer.FirstError'>: FirstError[#2, [Failure
instance: Traceback: <type 'exceptions.TypeError'>: not enough
arguments for format string
/home/coolprop/opt/lib/python2.7/site-packages/buildbot/process/properties.py:157:render
/home/coolprop/opt/lib/python2.7/site-packages/twisted/internet/defer.py:139:maybeDeferred
/home/coolprop/opt/lib/python2.7/site-packages/buildbot/process/properties.py:722:getRenderingFor
/home/coolprop/opt/lib/python2.7/site-packages/buildbot/process/properties.py:157:render
--- <exception caught here> ---
/home/coolprop/opt/lib/python2.7/site-packages/twisted/internet/defer.py:139:maybeDeferred
/home/coolprop/opt/lib/python2.7/site-packages/buildbot/process/properties.py:309:getRenderingFor
]]
]]
and the err.html of
twisted.internet.defer.FirstError: FirstError[#12, [Failure instance:
Traceback (failure with no frames): <class
'twisted.internet.defer.FirstError'>: FirstError[#2, [Failure instance:
Traceback: <type 'exceptions.TypeError'>: not enough arguments for format
string
/home/coolprop/opt/lib/python2.7/site-packages/buildbot/process/properties.py:157:render
/home/coolprop/opt/lib/python2.7/site-packages/twisted/internet/defer.py:139:maybeDeferred
/home/coolprop/opt/lib/python2.7/site-packages/buildbot/process/properties.py:722:getRenderingFor
/home/coolprop/opt/lib/python2.7/site-packages/buildbot/process/properties.py:157:render
--- <exception caught here> ---
/home/coolprop/opt/lib/python2.7/site-packages/twisted/internet/defer.py:139:maybeDeferred
/home/coolprop/opt/lib/python2.7/site-packages/buildbot/process/properties.py:309:getRenderingFor
]] ]]
twisted.internet.defer.FirstError: FirstError[#12, [Failure instance:
Traceback (failure with no frames): <class
'twisted.internet.defer.FirstError'>: FirstError[#2, [Failure instance:
Traceback: <type 'exceptions.TypeError'>: not enough arguments for format
string
/home/coolprop/opt/lib/python2.7/site-packages/buildbot/process/properties.py:157:render
/home/coolprop/opt/lib/python2.7/site-packages/twisted/internet/defer.py:139:maybeDeferred
/home/coolprop/opt/lib/python2.7/site-packages/buildbot/process/properties.py:722:getRenderingFor
/home/coolprop/opt/lib/python2.7/site-packages/buildbot/process/properties.py:157:render
--- <exception caught here> ---
/home/coolprop/opt/lib/python2.7/site-packages/twisted/internet/defer.py:139:maybeDeferred
/home/coolprop/opt/lib/python2.7/site-packages/buildbot/process/properties.py:309:getRenderingFor
]] ]]
I am a bit at a loss to make sense of this since it seems to work fine on
linux and I don't see any obvious differences between the two calls. It
complains about a typeerror, but really it seems fine to me. I have
checked that the windows shell can do a command like
if yes == no (del /q *)
and it seems to be fine. Anyone have an idea?
Thanks,
Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20140808/16197eac/attachment.html>
More information about the devel
mailing list