Boost logo

Boost Testing :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2007-09-16 22:20:12


Rene Rivera wrote:
> Beman Dawes wrote:
>> Rene Rivera wrote:
>>
>>> ... the automatic
>>> update of the script was never fixed by meta-comm -- and I have no clue
>>> how to fix that part yet).
>> That's a high priority to fix, since automatic update is both easier for
>> testers and more robust.
>>
>> Maybe more eyes would help. What is the apparent problem,
>
> The apparent problem is that it doesn't update :-)
>
>> what's your
>> proposed fix,
>
> I have none... I don't have a clue why it doesn't work. I've looked at
> the code and it seems reasonably obvious. Yet it doesn't work.

Hum... My reaction to that code is the same as yours - seems like it
should work. I do find it a bit disquieting that there is no check to
see if source and self are in fact the same file.

I did some interactive testing with python, and was surprised to see
print treating os.stat(x).st_mtime as floating point. That seems odd. I
wonder if that could be affecting the compare?

>> and what are you having trouble understanding? I assume
>> this is something in regression.py?
>
> Yep, AFAICT it's all in the "update_itself" function beginning at line
> 716. It does a time stamp check of some sort to figure out if should
> replace the current version.

My gut feeling is that we should (1) comment out the modification date
check, and always copy the file, except (2) do a check for self and
source resolving to the same file, and never do the copy in that case.

Since an == condition on the date compare is currently treated as the
file being out-of-date, and thus copied, testers are used to their copy
being overwritten. Thus I don't see any harm in always doing so, but
wanted to check with you before making these changes.

What do you think?

--Beman


Boost-testing list run by mbergal at meta-comm.com