Boost logo

Boost Testing :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2007-10-03 09:12:14


Rene Rivera wrote:
> David Abrahams wrote:
>> on Thu Sep 13 2007, Rene Rivera <grafikrobot-AT-gmail.com> wrote:
>>
>>> Beman Dawes wrote:
>>>> In the "Running Boost Regression Tests" docs, there is no mention in the
>>>> Installation section of the need to provide a user-config.jam file. Yet
>>>> without such a file, bjam fails because a couple of the tests require
>>>> python.
>>>>
>>>> There should be a bullet item saying you need to supply a
>>>> user-config.jam file, what it should contain, and where it should go.
>>>>
>>>> The minimal contents, according to the Boost.Python docs, are:
>>>>
>>>> import toolset : using ;
>>>> using python ;
>>> I believe Dave mentioned he was going to remove the conditional which
>>> doesn't define the BPL libs if Python isn't configured.
>> I mentioned what, now? What conditional?
>
> The conditional in libs/python/build/Jamfile.v2 that says:
>
> if [ python.configured ] {
> project boost/python ...
> lib boost_python ...
> }
> else
> {
> ECHO "warning: Python location is not configured" ;
> ECHO "warning: the Boost.Python library won't be built" ;
> }
>
>> When libs/python/build/Jamfile.v2 is read by bjam, unless you have a
>> very strange installation, python will be auto-configured. Invoking
>> all our tests *should* cause bjam to read that file.
>
> Well yes. But, currently, if a tester doesn't have Python configured
> they get a total halt in testing. Without the condition they would get
> compile, link, and other errors... Probably :-)

This just bit me again. I'm setting up a new machine, and the regression
tests failed because there was no user-config.jam file. A real
pain-in-the-anatomy.

But that isn't the end of it. At least for Ubuntu, the package manager
treats the Python development package as separate, so you have to know
to install that first. Otherwise most of the Boost.Python tests fail.

I'd like to suggest two changes:

1) Check for user-config.jam, and if not present create it with minimal
contents.

2) Check for the Python headers, and if not present issue an warning
message that say what the problem is and how to rectify it.

It would best if these checks ran any time bjam does anything that
implies Boost.Python is expected. As a fallback, perhaps they could be
made in regression.py.

--Beman


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