[Buildbot-devel] evaluation of WithProperties under a step containing a doStepIf

Jean-Michel Beuken jean-michel.beuken at uclouvain.be
Fri Aug 17 09:04:04 UTC 2012


Hi,

I migrate my 0.7.12 installation to version 0.8.6p1
Overall, it works pretty well ...
I just have a problem with a step, which, despite the fact that it should not be run ( with a doStepIf ),
the function *WithProperties *is even evaluated... and then,  there is a exception
the *property="packname" is only defined*  in shell.SetProperty if the "sendpack" property is "On"

it "works" with the version 0.7.12

a part of my code :

------------------------------------------
def making_pack(step):
     try:
        a = step.getProperty("sendpack")
     except:
        a = "off"
     return a != "off"

Step_Create_Pack_Buda_gcc44 = [
      shell.ShellCommand(name = "pack",
                         command='make dist',timeout=12000,
*doStepIf = making_pack*,
                         workdir = WithProperties("%s_%s","username","mybranch"),
                         env={ }, logfiles={},
                         description=["making dist..."], descriptionDone=["pack done"],haltOnFailure = 1,),

      shell.SetProperty(name="packname",command="ls abinit*tar.gz > /dev/null 2>&1 && ls abinit*tar.gz | sed -e 's/\.tar\.gz//'",
*doStepIf = making_pack*,
                        workdir = WithProperties("%s_%s","username","mybranch"),
*property="packname"*,descriptionDone=["packname done"], haltOnFailure = 1,),

      FileUpload( *doStepIf = making_pack*,
slavesrc = *WithProperties("%s_%s/%s.tar.gz","username","mybranch","packname")*,
                  masterdest= WithProperties("/var/www/html//UnOfficialPackages/abinit_%s_r%s_%s_unofficial.tar.gz","mybranch","revno","username"),
                  workdir="",mode=0666,haltOnFailure = 1, ),

      MasterShellCommand(
*doStepIf = making_pack*,
                 command= WithProperties("~buildbot/nightly/SendNotificationPackage.sh abinit_%s_r%s_%s_unofficial.tar.gz %s","mybranch","revno","username","sendpack"),
                          ),

]
---------------------------------------

is it a bad coding , a "feature" or a bug  ?
how to handle this problem ?

thanks in advance

jmb

-- 

----------------------------------------------------

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

----------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20120817/7fbe6ecd/attachment.html>


More information about the devel mailing list