Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2007-04-05 03:24:32


On Sunday 01 April 2007 16:58, Jurko Gospodnetiæ wrote:
> 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.

Ouch! Rene, I think regexps in filename is your change. Do you have
an opinion what fix is right?

>
> 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.

Likewise, Rene, do you have an opinion here?

If I understand correctly, regexp based matching was introduced just
so that you don't need to explicitly pass the right toolset name to
tests. Do you think that's still needed?

> 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. :-)))

I'm not using any IDE, I just put print statements in python code ;-)

- Volodya


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