<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">Le mar. 15 mars 2016 à 22:35, honas grael <<a href="mailto:honasgraeymael@gmail.com">honasgraeymael@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi reading the docs I came across<br><span style="font-family:comic sans ms,sans-serif"><i><br></i></span><dl><dt><span style="font-family:comic sans ms,sans-serif"><i><span><span>decodeRC</span></span></i></span></dt><dd><span style="font-family:comic sans ms,sans-serif"><i>This is a dictionary that decodes exit codes into results value.
For example, <span><span>{0:SUCCESS,1:FAILURE,2:WARNINGS}</span></span>, will treat the exit code <span><span>2</span></span> as WARNINGS.
The default is to treat just 0 as successful.
(<span><span>{0:SUCCESS}</span></span>) any exit code not present in the dictionary will be treated as <span><span>FAILURE</span></span></i></span></dd></dl><p>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</p><p>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.</p><p>so the master.cfg looks somewhat like this</p><pre><span>f</span><span>actory.</span><span>addStep</span><span>(</span><span>steps</span><span>.</span><span>ShellCommand</span><span>(</span>
              <span>command</span><span>=</span><span>["run_my_custom_executable.exe","config_file_for_executable.txt"</span><span></span><span>],</span>
              <span>logfiles</span><span>=</span><span>{</span><span>"triallog"</span><span>:</span> <span>{</span><span>"filename"</span><span>:</span> <span>"c:\\temp\\test.log"</span><span>,</span>
                   HaltOnFailure=True,<br>DecodeRC={0:"success",1:"failure"}<br><span>}}))<br></span></pre></div></div></blockquote><div><br></div><div>Hi honas , you should not use 'failure' as a string, but rather the FAILURE constant from the buildbot.process.results module.</div><br></div></div>