Boost Testing :
From: Vladimir Prus (ghost_at_[hidden])
Date: 2007-03-23 11:54:15
David Abrahams wrote:
> on Fri Mar 23 2007, Martin Wille <mw8329-AT-yahoo.com.au> wrote:
>> I wrote:
>>> David Abrahams wrote:
>>>> seems to indicate corruption of the python executable. Is everything
>>>> OK with that installation?
>>> I can run the Python executable without problems. The error message
>>> looks like Python tried to execute the python binary as a Python script.
>> That's exactly what's happening. The following is from bjam.log from my
>> recent x86/64 run, the third line says that an unrelated python binary
>> gets used to run the correct python binary:
>> export PYTHONPATH
>> /usr/bin/python2.4 /usr/local/python/2.4/gcc-4.1.0/bin/python2.4
>> "../libs/python/test/test_builtin_converters.py" >
> I suspect I know the reason for this problem, and I've checked in a
> IIUC, your configuration looks like:
> using python : 2.4 : ... ;
> using python : 2.4 : ... : : : <toolset>gcc
> <toolset-gcc:version>4.1.2_linux_x86_64 ; using python : 2.4 : ... : :
> : <toolset>gcc <toolset-gcc:version>4.1.0_linux_x86_64 ;
> The intention is of course that the latter pythons will be used in
> preference to the former one if their conditions are matched more
> We are using the "flags" rule to directly associate the interpreter
> command with targets being built, provided the condition passed is
> # Set up the PYTHON variable to point at the interpreter.
> flags python.capture-output PYTHON $(condition:J=/) :
> $(interpreter-cmd) ;
The version before your changes had this:
# Set up the PYTHON variable to point at the interpreter.
# If no specific condition is specified, set global value
# If condition is specified, set PYTHON on target. It will
# override the global value.
if ! $(condition)
PYTHON = $(interpreter) ;
flags python.capture-output PYTHON $(condition:J=/) : $(interpreter) ;
So, if condition is empty, you get the global PYTHON. You last code just has
flags python.capture-output PYTHON $(condition:J=/) : $(interpreter-cmd) ;
which explains the problem. The way you fixed the problem just now seems
OK for me as well, though.
Do you think your last checkin fixed everything and Martin should try