Boost logo

Boost-Build :

From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2006-11-06 02:32:34


David Abrahams wrote:
> Vladimir Prus <ghost_at_[hidden]> writes:
>
>> I'm not quite sure about V1's behaviour where test-suites were
>> explicit by default. That differs from every other target.
>>
>> Also, IIRC, V1 has a special 'test' target that is not declared
>> explicitly, and which results in building all tests. Again, I'm not
>> sure it's good idea to implicitly define taregts.
>
> It may not be as important in v2, although if you want to aggregate
> all the tests from subprojects, into one target, I don't see a better
> way.
>
>> So, what do you think is the right behaviour to have in V2?
>
> test suites will often want to be explicit. In the common (non-boost)
> case, people will put the test suites alongside their other main
> targets in a single project, not separated by directory.

I don't know about people in general, but I normally maintain a "mirrored"
directory structure for my tests (soft of "idealized" below):

<foo>
    Jamfile.v2
    <src>
        <prj1>
            Jamfile.v2
            <include>
                <prj1>
                    comp1.hpp
                    comp2.hpp
                    <detail>
                        impl_defined.hpp
            <src>
                Jamfile.v2
                <prj1>
                    comp1.cpp
                    comp2.cpp
                    <detail>
                        impl_defined.cpp
            <test>
                Jamfile.v2
                <prj1>
                    comp1_test.cpp
                    comp2_test.cpp
                    <detail>
                        impl_defined_test.cpp

        <prj2>
            ...
            <include>
            <src>
            <test>

(I know it's a bit java'ish, but it works for me)

> In general,
>
> bjam
>
> shouldn't run a big test suite. IMO.

I've done it both ways (explicit/implicit) the last two projects. As long as
both ways are possible to do easily, I personally don't really mind what the
default is.

>
> Whether or not that makes it worth having all test suites be explicit
> by default, I don't know.

If they are explicit by default, can they be made implicit by something
similar to:

implicit test ;

?

// Johan


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