[gdal-dev] Tons of errors in tests

Andrew C Aitchison andrew at aitchison.me.uk
Wed Jun 2 08:35:31 PDT 2021


On Wed, 2 Jun 2021, Javier Jimenez Shaw wrote:

> Hello
>
> I am trying to build GDAL (this worked) and run the tests (tons of
> failures). Because it is over a clean clone of master, I think there is
> something wrong in my configuration. Maybe you can help me.


> cd ../autotest
> pip install -r requirements.txt
>
> python -m pytest
> Test session starts (platform: linux, Python 3.8.5, pytest 4.6.9,
> pytest-sugar 0.9.4)

I have Ubuntu 21.04/hirsute:
(platform: linux, Python 3.9.5, pytest 6.2.3, pytest-sugar 0.9.4)

4.69 to 6.2.3 is quite a jump in pytest. Is it a python2 or a python3 pytest ?
GDAL is now python 3.

When I started running the autotests recently, I discovered that the
python3 pytest is
         /usr/bin/pytest-3
not
         /usr/bin/pytest

Assuming this is your problem too,
you could change autotest/GNUmakefile;
I just sym-linked pytest-3 to pytest

> OS: Ubuntu 20.04
> Python: 3.8.5
> $ apt list --installed | grep gdal
> gdal-bin/focal,now 3.0.4+dfsg-1build3 amd64 [installed]
> gdal-data/focal,focal,now 3.0.4+dfsg-1build3 all [installed,automatic]
> libgdal-dev/focal,now 3.0.4+dfsg-1build3 amd64 [installed]
> libgdal26/focal,now 3.0.4+dfsg-1build3 amd64 [installed,automatic]
> python3-gdal/focal,now 3.0.4+dfsg-1build3 amd64 [installed,automatic]
>
> Following the instructions in
> https://github.com/OSGeo/gdal/blob/master/CONTRIBUTING.md
>
> cd gdal
> ./configure
> make -j8 -s
> cd apps; make -s test_ogrsf; cd ..
>
> . scripts/setdevenv.sh
> gdalinfo --version
> $ GDAL 3.4.0dev-6b8835c2b5, released 2021/06/02
>
> cd ../autotest
> pip install -r requirements.txt
>
> python -m pytest
> Test session starts (platform: linux, Python 3.8.5, pytest 4.6.9,
> pytest-sugar 0.9.4)

-- 
Andrew C. Aitchison					Kendal, UK
 			andrew at aitchison.me.uk


More information about the gdal-dev mailing list