[Buildbot-devel] Updating / reusing an environment (in a later buildstep)

Terry.Rankine at csiro.au Terry.Rankine at csiro.au
Thu Aug 27 23:24:50 UTC 2009


Hi Brad

We have a 'launcher' file which does this

icc_do my_command arg1 arg2 .... argn

icc_do does the iccvars load and then runs your the rest of the command line.

it was the easiest / lazyiest way we could work out how to do it.

the icc_do was checked in with the source, and also had some CC flags set which we wanted to always happen on compiles.

Terry
________________________________________
From: Brad Hards [bradh at frogmouth.net]
Sent: Friday, 28 August 2009 6:45 AM
To: buildbot-devel at lists.sourceforge.net
Subject: [Buildbot-devel] Updating / reusing an environment (in a later buildstep)

Hi,

I'm trying to set up a builder that uses icc (where the system default is
gcc). To get the icc / icpc stuff to work, I need to set the right environment.

So the first part of the build factory looks like:
iccenv={'PATH' : '/usr/local/samba/bin:/usr/local/bin:/bin:/usr/bin',
        'CC' : 'icc', 'CXX' : 'icpc'}

fullcheckoutwithicc = factory.BuildFactory()
fullcheckoutwithicc.addStep(ShellCommand(command="/opt/intel/Compiler/11.1/046/bin/iccvars.sh ia32", env=iccenv, flunkOnFailu\
re=True))
fullcheckoutwithicc.addStep(SVN(mode='clobber', svnurl=svnrepository))
fullcheckoutwithicc.addStep(ShellCommand(command=["./autogen.sh"], env=iccenv))
fullcheckoutwithicc.addStep(Configure(command=["./configure", "--prefix=/usr/local/samba"], env=iccenv))

That doesn't work though - the earlier buildsteps don't affect the env that
is passed to later steps.

The only way I can think to make this work is to manually set all of the
environment variables that the "iccvars.sh" script handles. That (obviously)
isn't very elegant though.

Any suggestions?

Brad

[I was originally going to call this "saving the environment", but resisted
the temptation :-)]

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Buildbot-devel mailing list
Buildbot-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/buildbot-devel



More information about the devel mailing list