|
Boost-Build : |
Subject: Re: [Boost-build] Running Single Test in Suite
From: Lee Clagett (forum_at_[hidden])
Date: 2014-08-28 11:50:26
On Wed, Aug 27, 2014 at 2:11 AM, Vladimir Prus <ghost_at_[hidden]> wrote:
> On 08/26/2014 07:22 PM, Lee Clagett wrote:
>
>> If I have the following (truncated) Jamfile:
>>
>> test-suite spirit_v2/karma :
>>
>> [ compile-fail karma/grammar_fail.cpp : :
>> karma_grammar_fail ]
>> [ compile-fail karma/rule_fail.cpp : : karma_rule_fail ]
>> ;
>>
>> How do I run just karma_rule_fail test, and not karma_grammar_fail? The
>> following don't seem to work "b2 spirit_v2/karma/karma_rule_
>> fail", or "b2 karma_rule_fail". It is possible to run just a single test
>> case in the suite, or is the suite the lowest-level target that can
>> be executed?
>>
>
> Hi Lee,
>
> to be honest, I don't know what's happening here. The actual name of the
> target (as reported by --debug-building)
> appears to be karma_grammar_fail-p3, and running
>
> b2 karma_grammar_fail-p3
>
> does build that target. I don't recall any logic that would add "-p3" -
> does anybody else know?
>
> - Volodya
>
I found it, the answer is in the same testing Jamfile:
rule run ( sources + : args * : input-files * : requirements * :
target-name ? : default-build * )
{
target-name ?= $(sources[1]:D=:S=) ;
v3_tests += [ testing.run $(sources) : $(args) : $(input-files) :
$(requirements) : $(target-name)-p3 : $(default-build) ] ;
}
Spirit overrides the rules defined by the normal testing framework. One of
the changes is that -p3 is added to any of the test names. Now that I know
this, it will be easier to finish the testing I was working on, thanks.
Lee
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