Boost logo

Boost-Build :

Subject: Re: [Boost-build] Running tests with executable built by another target
From: Alexander Sack (pisymbol_at_[hidden])
Date: 2009-01-29 17:13:26


On Thu, Jan 29, 2009 at 9:08 AM, Sven Van Echelpoel
<sven.van.echelpoel_at_[hidden]> wrote:
> Hi,
>
> I want to run some tests with an executable I have built with some exe
> rule. How do I do this?
>
> E.g. I have this:
>
> exe my-exe : main.cpp ;
>
> unit-test my-exe-test
> : [ ??? my-exe : <args come here> ]
> ^^^
> What comes here?
> ;
>
> I've tried run, but it tries to link a test executable with my-exe as a
> dependency.
>
> Any help would be appreciated,

Ok you have a couple of options:

- If you search this list (use nabble), I asked this question already
(search for my posts its obvious) and both Volodya and Steven gave
concrete examples of how to do this. Its still a little non-intuitive
but definitely doable. This really needs to be in the FAQ (and would
definitely be part of something I'm trying to cook up).

- The down and dirty way to do this is use an "install" directive to
install the binary somewhere where you can then reference it (i.e.
within the build tree) - this actually worked for me in the interim
nicely as a temporary workaround.

Let me see if I can dig up Volodya's example...

-aps


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