|
Boost-Build : |
From: Peter (pjfoley_at_[hidden])
Date: 2007-01-06 23:42:50
Volodya,
Could you please let me know where in the source tree the testing.html file
is? I would like to update some parts of it and submit it.
I have tried searching through the tools/build directory but have not had
much luck.
Some questions on the document:
1. Your testing page states that the simplest way to implement
unit-test's is with the "unit-test" rule. Yet when I look in the
testing.jam file I see:
(Lines 23 and 24)
# For historical reason, a 'unit-test' rule is available which
# has the same syntax as 'exe' and behaves just like 'run'.
(Note: that the above lines get printed out when you do bjam --help
testing)
Further down (lines 257 to 261) I see that it states that the unit-test rule
was left in because it is more user-friendly. This was because of this post
to the mail list: http://tinyurl.com/yxhrqd
It might be worthwhile to state the pro's and con's between the "unit-test"
and the run rule.
2. I am probably doing something wrong but I could not work out how to
get the run rule to work. You have provided an example for the "unit-test"
rule but not one for the "run" rule.
As I have stated I have been looking through some of the regression tests
and noticed that its usage is something like:
test-suite test_name
:
[ run mytest.cpp
:
:
: # requirements
<include>$(BOOST_ROOT)
<library-path>$(BOOST_ROOT)/lib
]
;
Is this the correct usage? Or is there another way you can call the "run"
rule?
3. I am guessing there is probably a historical reason why this is the
case but why is the format of the "run" rule different to all the other test
rules (eg "compile", "compile-fail", "link" and "link-fail")?
The format of run is:
rule run ( sources + : args * : input-files * : requirements * : target-name
? : default-build * )
The format for the others is:
rule compile ( sources : requirements * : target-name ? )
This is non-intuitive I was expecting to be able to swap from compile to run
while I was testing what they could do.
Also if you look here: http://tinyurl.com/skhpq it seems to suggest that
this is the commonly expected syntax.
I am guessing it is to late to change it but would it be possible to change
the "run" rule to something like:
rule run ( sources + : requirements * : target-name : args * : input-files *
? : default-build * )
4. This is more a minor thing and is probably expected knowledge for
using bjam but what exactly does the "helpers" (last word prior to the
semi-colon) mean in this line:
unit-test helpers_test : helpers_test.cpp helpers ;
Is it another source file or executable?
Thanks,
Peter.
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