List Info

Thread: Re: Boost.Build unit test bugs.




Re: Boost.Build unit test bugs.
country flaguser name
Russian Federation
2007-04-05 02: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
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Re: Boost.Build unit test bugs.
country flaguser name
Croatia
2007-04-05 04:38:07
   Hi.

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

   From what I've seen so far it seems that globbing (my
mistake in the 
previous post - these are not actually full regular
expressions but unix 
style glob syntax for specifying file/folder paths) was
introduced you 
would not need to specify the exact target folder (including
all the 
feature specific folders).

   You did not have to specify the toolset before either,
but instead 
you specify '$toolset' in the path and it gets expanded into
the proper 
toolset name using Tester.adjust_name().

   What is new is that it now gets expanded into the name of
the toolset 
and and asterisk, e.g. 'msvc*' or 'gcc*'.


   One other thing I noticed is that the asterisk gets
appended in two 
places in code (Tester.adjust_name() and
Tester.expect_content()) and I 
am not quite sure this is ok. Perhaps someone more
knowledgable could 
take a look at this.


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

   )
Well.. that's nice when you already know the code... but I
find 
it extremely useful when researching new code to be able to
place 
breakpoint and see the current stack and possibly look
around at 
different variables. And, since its 'getting to know your
surroundings' 
kind of research you don't really know what you're looking
for until you 
get there...  In that
scenario it 'too painful' to have to restart 
the whole process every time you decide to look at something
else or 
look at the stack information in some neighboring function
to see where 
it gets called from...

   Best regards,
     Jurko Gospodnetiæ

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Re: Boost.Build unit test bugs.
country flaguser name
United States
2007-08-15 13:20:07
Vladimir Prus wrote:
> On Sunday 01 April 2007 16:58, Jurko Gospodnetić
wrote:
>>    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?

Hm, expect_modification doesn't seem to be used by any
tests.


-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software
.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )