[Pyrex] Testing on Linux

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Apr 19 08:55:07 CEST 2006


Stefan Behnel wrote:

> I'm on Python 2.4.2 and GCC 4.0.2 on Linux AMD64. Most errors I got simply
> stated that you should compile with -fPIC to make it work, so I added it.

Compilation should be done with all the C compiler flags
(apart from warning ones such as -Wall) that you normally
use to compile Python extensions on the platform concerned.

> /home/me/source/Python/pyrex/Pyrex-0.9.4/Tests/2/powop.c: In function 'PyObject* __pyx_f_5powop_f(PyObject*, PyObject*, PyObject*)':
> /home/me/source/Python/pyrex/Pyrex-0.9.4/Tests/2/powop.c:75: warning: converting to 'int' from 'double'

I get that one too, so don't worry. Probably I shouldn't
include a test which does that.

> /home/me/source/Python/pyrex/Pyrex-0.9.4/Tests/4/cenum.c: In function 'void __pyx_f_5cenum_eggs()':
> /home/me/source/Python/pyrex/Pyrex-0.9.4/Tests/4/cenum.c:83: error: invalid conversion from 'int' to '__pyx_t_5cenum_Spam'
> TEST FAILED: C++ compilation error.

This seems to be due to C++ being stricter than C about
int-enum compatibility. Although for me it only gives a
warning.

Again, I probably should modify the test.

> Running test Tests/4/typecast.pyx
> /home/me/source/Python/pyrex/Pyrex-0.9.4/Tests/4/typecast.c: In function '__pyx_f_8typecast_f':
> /home/me/source/Python/pyrex/Pyrex-0.9.4/Tests/4/typecast.c:58: warning: cast to pointer from integer of different size

Yes, that's probably a 64-bit issue. I wouldn't worry
about it.

> Running test Tests/Bugs/bubke/bubke1.pyx
> /home/me/source/Python/pyrex/Pyrex-0.9.4/Tests/Bugs/bubke/bubke1.c:14:31: error: numarray/numarray.h: No such file or directory

Looks like you don't have Numeric installed, or it's
not in the usual location.

> Running test Tests/Runnable1/r_extnumeric2.pyx
> r_extnumeric2.out differs from reference.
> Flexidiff:
> New    7: 'Element size: 8'
> Ref    7: 'Element size: 4'

Another 64-bit problem. Probably should modify the test
to make it less platform-specific.

> Exception exceptions.Exception: <exceptions.Exception instance at 0x2ab69a54b518> in 'r_excval.sandwich' ignored
> Running test Tests/Runnable2/r_extweakref.pyx
> r_extweakref.out differs from reference.
> Flexidiff:
> New    1: 'The animal is <r_extweakref.Animal object at 0x2b769c8c4f30>'
> Ref    1: 'The animal is <r_extweakref.Animal object at 0x5a830>'

And another one! Although maybe the test output analyser
is what needs fixing here.

> se_mixtabspace.lis differs from reference.
> Flexidiff:
> New    1: ': Possible inconsistent indentation'
> Ref    1: ': Mixed use of tabs and spaces'
> TEST FAILED: se_mixtabspace.lis differs from reference

Hmmm, this may be a case of the tab-to-space conversion
that happens in my distribution-making process mangling
the test file.

Anyway, none of those failures seem to indicate anything wrong
with Pyrex, just some shortcomings in the tests and testing
process. Considering this is the first time anyone has tried
to run the tests on any other machine that I know of, it's
not bad going!

--
Greg



More information about the Pyrex mailing list