[Buildbot-devel] hideStepIf problem

Jean-Michel Beuken jean-michel.beuken at uclouvain.be
Wed Feb 27 19:02:07 UTC 2013


Hi Esther,

thanks for your advance

I try this  :

-------------------------
def skipped(result, s):
     return (result == buildbot.status.results.SKIPPED)

doStepIf = is_newtest,  hideStepIf = skipped,
------------------------------------------

right ?   if yes,  same problem...

:-(

jmb


On 27/02/2013 18:39, Esther Baruk wrote:
> Hello,
>
> For what it's worth, I encountered the same problem as you. I wanted to hide the step if it was skipped.
> Testing the condition "results==SKIPPED" didn't work. The solution was to provide the absolute path of the SKIPPED value.
> The code of the function I pass to hideStepIf looks like:
>
> def skipped(result, s):
>     return (result == buildbot.status.results.SKIPPED)
>
> Hope this helps,
>
> Esther Baruk
>
> Le 27/02/2013 18:33, Jean-Michel Beuken a écrit :
>> Hi,
>>
>> the doStepIf works perfectly ...
>> but when I try to use hideStepIf with the same argument ( boolean or integer ) that in the doStepIf,
>> the build hangs ( Build in progress...)   ( no way to Stop the current build ..only with a restart of master :-( )
>>
>>
>> this is a part of the code used to set "hideStepIf" under a step :
>>
>> -----------------------------------------
>> class MyCheck(ShellCommand):
>>     def evaluateCommand(self, cmd):
>>         self.setProperty('newtest', 1, "newtest")
>>         if cmd.rc != 0:
>>                 self.setProperty('newtest', 0, "newtest")
>>         return SUCCESS
>>
>> def is_newtest(step):
>>     a = step.getProperty("newtest")
>>     return a
>>
>> doStepIf = is_newtest
>> hideStepIf = not( is_newtest )
>> -----------------------------------------
>>
>> hideStepIf = True    or    hideStepIf = False     works correctly
>>
>> but ( found in  Buildbot 0.8.7p1 doc )
>>
>> hideStepIf=lambda results, s: results==SKIPPED
>>
>> doesn't work...  ( to be honest, I do not quite understand how it can work :-[ )
>>
>> I also try with  1 -> False and 0 -> True   in the evaluateCommand() , but it doesn't work...
>>
>> any idea ?
>>
>> thanks in advance
>>
>> jmb
>>
>> PS : sorry for my english...
>>
>> -- 
>>
>> ----------------------------------------------------
>>
>> Jean-Michel Beuken
>>
>> Computer Scientist
>>
>> Software Engineer for ETSF and ABINIT.ORG
>>
>>
>> Université catholique de Louvain
>>
>> pôle NAPS/IMCN (ex-PCPM), Bat. SC17
>>
>> 8, Chemin des étoiles,   Bt L7.03.01
>>
>> 1348 Louvain-la-Neuve BELGIUM
>>
>> ----------------------------------------------------
>>
>> Tel : (3210) 473570 Fax : (3210) 473102
>>
>> http://www.uclouvain.be/jean-michel.beuken
>>
>> ----------------------------------------------------
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics
>> Download AppDynamics Lite for free today:
>> http://p.sf.net/sfu/appdyn_d2d_feb
>>
>>
>> _______________________________________________
>> Buildbot-devel mailing list
>> Buildbot-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20130227/9e31e2a9/attachment.html>


More information about the devel mailing list