Boost logo

Boost-Build :

Subject: Re: [Boost-build] unit tests for bootstrapped compiler with boost.build
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2011-05-26 14:47:13


On Thursday, May 26, 2011 22:36:06 Bryce Lelbach wrote:
> Hi - my LISP compiler and interpreter uses Boost.Build (Jamfiles at
> https://github.com/brycelelbach/prana). I need to do the following:
>
> 0) Build the interpreter executable (already done)
> 1) Run Boost.Build style tests (e.g. run, run-fail) on multiple input
> files, using the interpreter.
>
> How do I do this?

You need to declare a generator that has your source file as input,
and RUN_OUTPUT as output. Probably something like that:

generators.register-standard lisp.capture-output : LISP : RUN_OUTPUT ;

Then, define the action something like this:

rule capture-output ( target : source : properties * )
{
        LAUNCHER on $(target) = /path-to-your-interpreter ;
    testing.capture-output $(target) : $(source) : $(properties) ;
}

HTH,

-- 
Vladimir Prus
CodeSourcery / Mentor Graphics
+7 (812) 677-68-40

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