Boost logo

Boost-Build :

From: Jurko Gospodnetiæ (jurko_for_boost_at_[hidden])
Date: 2007-04-01 08:58:56


   Hi.

   I think I just tracked down some bugs in the Boost.Build unit testing
framework causing it to pass tests when it should not.

   Since the milestone 11 release some sort of regular expression
support was added, most likely to allow the tests to work no matter the
exact target folders Boost.Build creates based on its feature values.

   Both bugs are located in the BoostBuild.jam module and unfortunately
I am not yet comfortable enough with either Python, Boost.Build or the
testing framework used to fix them by myself. :-(

   Bug 1.
   ------

   Tester.expect_nothing() tests directly whether the given filename
which may be a regular expression is contained inside a specific
filename collection which never contains regular expressions and fails
if it does. This means that expect_nothing tests will never fail as they
never fail for filenames specified as regular expressions and the
Tester.adjust_names() function always returns a regular expression filename.

   Bug 2.
   ------

   Tester.expect_addition(), Tester.expect_removal() and
Tester.expect_touch() tests never fail as their glob_remove() calls do
not throw an exception when they do not find targets. The glob_remove()
function seems to be a replacement for the old remove() calls that threw
an exception if their target could not be found. To fix this simple
throw an exception from glob_remove() in case it does not find any
elements to remove.

   Bug 3.
   ------

   Tester::expect_modification() always fails as it uses the old
remove() call instead of the new glob_remove() call to test whether a
regular expression filename can be located and removed from a collection
not containing only non-regular expression filenames.

   You should also check any other Tester.adjust_names() calls to make
sure their return values are not passed to someone not expecting a
regular expression filename.

   Hope this helps...

   Best regards,
     Jurko Gospodnetiæ

P.S.
   Can anyone suggest a good Python IDE for Windows? I can't seem to
find one to debug in easily... :-) I'd like to work on this but my
current tool chain makes this quite painful. :-)))


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