|
Boost-Build : |
From: Rene Rivera (grafik666_at_[hidden])
Date: 2003-07-21 15:44:05
Taking this to the jamboost list, where it's more appropriate...
[2003-07-21] Robert Ramey wrote:
>Fellow boosters.,
>
>I hope to be soon uploading a draft of a much evolved version of the
serialization
>library
>reviewed last november. I have been working with BJAM to automate builind
>of library and tests, and running the tests. So far so good.
>
>The system build around BJAM seems to work very well and I am very pleased
>with it - BUT. The logic is seems to be spread around different files and
>directories and is hard to track down. and the jam language takes some
>getting used to.
It is hard to follow sometimes ;-)
>I currently have about 30 tests. I would like to run each of the tests
under
>all the following combinations:
>
>30 tests
>5 3 or 4 compilers I have on my machine
>2 modes (release and debug)
>5 different compile time defines - for applying each test to each archive
>
>so that's around 1500 test combinations.
Ouch!
>So I need help in enhancing my jamfile to do this automatically. If any
jam
>expert wants to help me with this I would be please do here from him
>on private email.
First, for different compilers the only way to set that is through the TOOLS
variable. Seeing as other people will have different tools there's now way,
and no desire, to speficy that in the Jamfiles. But you could set an
environment var in your system to always be set, as enviroment vars are
automatically imported into bjam.
Second, the release+debug variants. You can specify those in the Jamfile, as
the sixth argument to the "run" rule. Interesting is that that's the only
testing rule you can specify that ony. But I would not suggest you do this.
The regression testing would probably (not really sure) not work if
something in addition to 1 variant got built. And this is, again, something
you really want to set in the command line. But you can set it globally in
the BUILD env variable if you don't like typing ;-)
That leaves, 30 tests/5 compile defines. For that I would suggest writting a
rule which runs through the list of 5 defines and generates the tests. For
example: (rough code hastily typed into email...)
rule apply-run ( sources + : args * : input-files * : requirements * : name
)
{
local tests ;
local defines = DEF1 DEF2 DEF3 DEF4 DEF5 ;
for local def in $(defines)
{
tests += [ run $(sources) : $(args) : $(input-files)
: $(requirements) <define>$(def) ] ;
}
}
And use that instead of the regular "run" testing rule.
PS. If you post your Jamfile, I'm sure we can be more informative ;-)
-- grafik - Don't Assume Anything
-- rrivera (at) acm.org - grafik (at) redshift-software.com
-- 102708583 (at) icq
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk