Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2007-12-25 04:48:19


On Sunday 23 December 2007 09:07:13 Jurko Gospodnetić wrote:
> Hi.
>
> Attached patch fixes the failing searched_lib.py test on Windows.
> Problem was that build DLL and import library files were getting copied
> by reading them in text mode. Corrected by adding a new default 'binary'
> parameter flag to the Tester.read() method and calling it with the
> binary flag set in both Tester copy operations.
>
> Besides that the rest are just a few cosmetic changes.

Thanks, checked in.

> And I noticed that the Tester.read_and_strip() method has something
> fishy in it related to how it handles trailing new-line characters.
> Unless I'm reading this Python code incorrectly it seems to add another
> newline in case the read text already ends with a newline but otherwise
> does not. Was that by design or was the intent to add a newline to files
> that do not end with one? I tried running the tests with the if in this
> function reversed and it made no difference.

Even though I'm responsible for adding that code, I have no idea what it
does :-(

        r14274 | vladimir_prus | 2002-07-02 14:34:43 +0400 (Tue, 02 Jul 2002)

        Test system improvements w.r.t. file content matching.

            * test/BoostBuild.py (Tester.read_and_strip, Tester.expect_content):
                New methods.
            * test/test_system.html: Document the above methods.

Ah, wait, I think the idea is this:

        1. We read all lines,
        2. We strip all whitespace and beginning and end
        3. We join the strings with "\n"

So, if the very last line was ending with "\n", we'd strip it, and never put it
back when joining. So, we need to handle this explicitly.

> My failed test count is now down to 4, 2 of which seem to be timer
> related (record_time rule) and 1 is the alias warning test I added for
> the related defect report.

Sounds great!

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