Boost logo

Boost-Build :

From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2007-11-17 13:08:18


Josh Napoli wrote:
> I'd like to build and test a python extension using bjam. How can I run
> a test against a python-extension without deleting the .pyd dependency?
>
> Based on the documentation, examples and tools/python.jam it appears
> that a python extension with a unit test should be built with a Jamfile
> like this:
>
> import python ;
> python-extension PyExt
> : # sources
> [ glob *.cpp *.hpp ]
> /boost/python//boost_python
> ;
> bpl-test testA : PyExt test/test_A.py ;
> bpl-test testB : PyExt test/test_B.py ;
> alias buildtest : PyExt testA testB ;
> explicit test_A test_B ;
>
> However, when testA passes, the PyExt.pyd file is deleted. testB fails,
> due to the missing dependency.

Hm, not sure how to go about preventing that at a fine grain level. But
you can turn off the deletion with the option "--preserve-test-targets".

> Why would you ever want to have the test rule delete the .pyd?

To conserve disk space for testers since running Boost regression tests
will eat incredible amounts of it when an executable is large, because
of debug syms. Which makes a difference between 1.5Gig vs. 3Gig.

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

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