[Buildbot-devel] hideStepIf problem

Esther Baruk esther.baruk at lexifi.com
Wed Feb 27 17:39:52 UTC 2013


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 thishelps,

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/f898db05/attachment.html>


More information about the devel mailing list