[prev in list] [next in list] [prev in thread] [next in thread] 

List:       boost-build
Subject:    Re: [Boost-build] Running Single Test in Suite
From:       Lee Clagett <forum () leeclagett ! com>
Date:       2014-08-28 15:50:26
Message-ID: CALD9dK1_2L0YFvM1JyRahwayBDBe3mki8tKwz6q6M-bkLZrSrA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Wed, Aug 27, 2014 at 2:11 AM, Vladimir Prus <ghost@cs.msu.su> 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

[Attachment #5 (text/html)]

<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Aug 27, 2014 \
at 2:11 AM, Vladimir Prus <span dir="ltr">&lt;<a href="mailto:ghost@cs.msu.su" \
target="_blank">ghost@cs.msu.su</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div class=""><div class="h5">On 08/26/2014 07:22 \
PM, Lee Clagett wrote:<br> <blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> If I have the \
following (truncated) Jamfile:<br> <br>
test-suite spirit_v2/karma :<br>
<br>
         [ compile-fail karma/grammar_fail.cpp              : : karma_grammar_fail \
                ]<br>
         [ compile-fail karma/rule_fail.cpp                  : : karma_rule_fail \
]<br>  ;<br>
<br>
How do I run just karma_rule_fail test, and not karma_grammar_fail? The following \
don&#39;t seem to work &quot;b2 spirit_v2/karma/karma_rule_<br> fail&quot;, or \
&quot;b2 karma_rule_fail&quot;. It is possible to run just a single test case in the \
suite, or is the suite the lowest-level target that can<br> be executed?<br>
</blockquote>
<br></div></div>
Hi Lee,<br>
<br>
to be honest, I don&#39;t know what&#39;s happening here. The actual name of the \
target (as reported by --debug-building)<br> appears to be karma_grammar_fail-p3, and \
running<br> <br>
            b2 karma_grammar_fail-p3<br>
<br>
does build that target. I don&#39;t recall any logic that would add &quot;-p3&quot; - \
does anybody else know?<br> <br>
- Volodya<br>
</blockquote></div><br></div><div class="gmail_extra">I found it, the answer is in \
the same testing Jamfile:<br><br>rule run ( sources + : args * : input-files * : \
requirements * : target-name ? :   default-build * )<br>{<br>  target-name ?= \
$(sources[1]:D=:S=) ;<br>       v3_tests += [ testing.run $(sources) : $(args) : \
$(input-files) : $(requirements) : $(target-name)-p3 : $(default-build) ] \
;<br>}<br><br></div><div class="gmail_extra">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.<br> <br>Lee<br></div></div>



_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic