From: Peter (pjfoley_at_[hidden])
Date: 2007-01-11 03:57:30
Just in case this email has been missed does anyone else have views on the
Also I have an outstanding question from the message prior to this one which
> Just out of curiosity what are the benefits of the "test-suite" target
> over "unit-test"?
> Is "test-suite" a formal framework for running multiple "unit-test"'s? Or
> is "test-suite" something specifically written for Boost's regression
> testing tools?
> -----Original Message-----
> From: Peter [mailto:pjfoley_at_[hidden]]
> Sent: Sunday, 7 January 2007 3:43 PM
> To: boost-build_at_[hidden]
> Subject: RE: [Boost-build] testing rules docs
> 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
> 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
> Is this the correct usage? Or is there another way you can call the "run"
> 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?
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