$include_dir="/home/hyper-archives/boost-build/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-build] Adding command line arguments to tests
From: Christian Auby (christian_at_[hidden])
Date: 2009-11-17 05:58:21
Snip:
---
bjam toolset=gcc -j2
...patience...
...patience...
...found 2380 targets...
...updating 2 targets...
testing.capture-output
bin\add.test\gcc-mingw-3.4.5\debug\link-static\threading-multi\add.run
====== BEGIN OUTPUT ======
<TestLog><TestSuite name="Tests"><TestCase name="universeInOrder"><Error
file="tests/add.cpp" line="11">check add(2, 2)
== 5
failed</Error><TestingTime>0</TestingTime></TestCase></TestSuite></TestLog>
*** 1 failure detected in test suite "Tests"
EXIT STATUS: 201
====== END OUTPUT ======
set
Path=d:\dev\MinGW\bin;d:\dev\MinGW\lib;d:\dev\MinGW\lib32;d:\dev\MinGW\lib64;%Path%
"bin\add.test\gcc-mingw-3.4.5\debug\link-static\threading-multi\add.exe"
--log_format=XML --log_level=test_suite >
"bin\add.test\gcc-mingw-3.4.5\debug\link-static\threading-multi\add.output"
2>&1
set status=%ERRORLEVEL%
echo. >>
"bin\add.test\gcc-mingw-3.4.5\debug\link-static\threading-multi\add.output"
echo EXIT STATUS: %status% >>
"bin\add.test\gcc-mingw-3.4.5\debug\link-static\threading-multi\add.output"
if %status% EQU 0 (
copy
"bin\add.test\gcc-mingw-3.4.5\debug\link-static\threading-multi\add.output"
"bin\add.test\gcc-mingw-3.4.5\d
ebug\link-static\threading-multi\add.run"
)
set verbose=0
if %status% NEQ 0 (
set verbose=1
)
if %verbose% EQU 1 (
echo ====== BEGIN OUTPUT ======
type
"bin\add.test\gcc-mingw-3.4.5\debug\link-static\threading-multi\add.output"
echo ====== END OUTPUT ======
)
exit %status%
...failed testing.capture-output
bin\add.test\gcc-mingw-3.4.5\debug\link-static\threading-multi\add.run...
...failed updating 1 target...
...skipped 1 target...
---
Why is this target failing? testing.capture-output is an internal
boost.test target I guess? This only happens if the test fails.
Christian
Vladimir Prus wrote:
> Christian Auby wrote:
>
>> I'm trying to use boost.test with boost.build. I need to pass
>> "--log_format=XML --log_level=test_suite" to the test to get XML that is
>> parsable.
>>
>> The first rule I tried was this:
>>
>> unit-test add_test
>> : tests/add.cpp
>> ;
>>
>> The test works fine but doesn't output XML. I then read on the mailing
>> list archives that I should use the run rule, as per:
>>
>> rule run ( sources + : args * : input-files * : requirements * :
>> target-name ?
>> : default-build * )
>>
>> It is unclear to me how I would create my rule from this. Help is
>> appreciated.
>
> Try:
>
> run tests/add.cpp : --log_format=XML --log_level=test_suite ;
>
> - Volodya
>
>
> _______________________________________________
> Unsubscribe & other changes: http://listarchives.boost.org/mailman/listinfo.cgi/boost-build
>