Boost logo

Boost-Build :

From: Zbynek Winkler (zw-bjam_at_[hidden])
Date: 2004-09-09 03:21:24


Vladimir Prus wrote:

>>What I would really like would be to replace the dependency
>>specification by something else that would state that 'unit-test b' is
>>unit test for b.cpp, so it needs to be run anytime b.obj is linked to
>>something. Something like
>>
>>unit-test a.cpp : a-test.cpp ;
>>unit-test b.cpp : b-test.cpp a.cpp ;
>>unit-test c.cpp : c-test.cpp b.cpp a.cpp ;
>>
>>which would equal to
>>
>>unit-test a : a.cpp a-test.cpp ;
>>unit-test b : b.cpp b-test.cpp a.cpp : <dependency>a ;
>>unit-test c : c.cpp c-test.cpp b.cpp a.cpp : <dependency>a <dependency>b ;
>>
>>
>
>Why do you need this. The way I arrange my tests is something like:
>
> lib l : a.cpp b.cpp c.cpp ;
> unit-test a-test : a-test.cpp l ;
> unit-test b-test : b-test.cpp l ;
>
>This is good because typically (for me), the a.cpp can't be tested in
>isolation, and a library is the smallest isolated unit.
>
>If I understand correctly, you want a.obj to never be included anywhere unless
>a-test succeeds. Why do you want it. Is the error generated by 'unit-test'
>not enough to catch your attention?
>
>
It would be... If only it is run. Suppose I change something that belong
to the library while working on something that links to the library.
Then the library is automatically rebuilt but the test is never run :-(.
Unless, of course, I change to the directory of the library and build
all there... Same problem.

Zbynek

-- 
http://zw.matfyz.cz/ http://robotika.cz/
Faculty of Mathematics and Physics, Charles University, Prague, Czech Republic
 

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