[users at bb.net] Using buildbot's DecodeRC

honas grael honasgraeymael at gmail.com
Tue Mar 15 21:35:32 UTC 2016


Hi reading the docs I came across

*decodeRC**This is a dictionary that decodes exit codes into results value.
For example, {0:SUCCESS,1:FAILURE,2:WARNINGS}, will treat the exit code 2
as WARNINGS. The default is to treat just 0 as successful. ({0:SUCCESS})
any exit code not present in the dictionary will be treated as FAILURE*

this seems pretty cool to me so I am trying to make use of it in my
buildstep, I am trying to use it in conjunction with HaltOnFailure

the build step launches an executable(yes I'm on windows 7), the executable
does a number of things, sometimes calling other executalbes, and
eventually returns with an exit code of 0(if successful) or 1 if
unsuccessful.

so the master.cfg looks somewhat like this

factory.addStep(steps.ShellCommand(
              command=["run_my_custom_executable.exe","config_file_for_executable.txt"],
              logfiles={"triallog": {"filename": "c:\\temp\\test.log",
                   HaltOnFailure=True,
DecodeRC={0:"success",1:"failure"}
}}))

I can deliberately make the executable return either 1 or zero
depending on the contents of the configuration file I use.

What I seem to be getting, regardless of whether the
run_my_custom_executable returns 1 or 0 is EXCEPTION in purple when I
trigger a build

However when I comment out the DecodeRC line in the master config I get
either Suceess or Failure as I would normally expect.

How should I be using this parameter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20160315/106b32d0/attachment.html>


More information about the users mailing list