[gdal-dev] There's something strange about two tests that are very similar

Even Rouault even.rouault at spatialys.com
Tue Mar 12 09:35:35 PDT 2024


- Are sure all needed files have been committed and pushed for the 
failing test?

- Perhaps an issue Windows CR-LF vs Unix LF end of line characters ? The 
default settings of git on Windows may mess with binary files. cf 
https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings

Le 12/03/2024 à 17:22, Abel Pau via gdal-dev a écrit :
>
> Hi,
>
> I have in a single test python file with 3 tests inside: 
> gdal/autotest/ogr/ogr_miramon_vector.py at master · AbelPau/gdal 
> (github.com) 
> <https://github.com/AbelPau/gdal/blob/master/autotest/ogr/ogr_miramon_vector.py#L134>
>
> In some actions the first and second are Ok but the third is not. 
> Example of failure:
>
> Some improvements for empty layers · AbelPau/gdal at 90a289c (github.com) 
> <https://github.com/AbelPau/gdal/actions/runs/8251854865/job/22569933640#step:12:4863>
>
> Here you have the log (return _gdal.OpenEx(*args, **kwargs)
>
> 4912 
> <https://github.com/AbelPau/gdal/actions/runs/8251854865/job/22569933640#step:12:4913>23: 
> E RuntimeError: Cannot open file %s.) <--- This happen in the driver 
> when open fails.
>
> The first two are OK:
>
> gdal/autotest/ogr/ogr_miramon_vector.py at master · AbelPau/gdal 
> (github.com) 
> <https://github.com/AbelPau/gdal/blob/master/autotest/ogr/ogr_miramon_vector.py#L48>
>
> gdal/autotest/ogr/ogr_miramon_vector.py at master · AbelPau/gdal 
> (github.com) 
> <https://github.com/AbelPau/gdal/blob/master/autotest/ogr/ogr_miramon_vector.py#L99>
>
> But this is not OK:
>
> gdal/autotest/ogr/ogr_miramon_vector.py at master · AbelPau/gdal 
> (github.com) 
> <https://github.com/AbelPau/gdal/blob/master/autotest/ogr/ogr_miramon_vector.py#L134>
>
> And the file are all on the correct place (I am sure about that):
>
> For the second one, for example:
>
> gdal/autotest/ogr/data/miramon/Arcs/SimpleArcs at master · 
> AbelPau/gdal (github.com) 
> <https://github.com/AbelPau/gdal/tree/master/autotest/ogr/data/miramon/Arcs/SimpleArcs>
>
> And for the third one:
>
> gdal/autotest/ogr/data/miramon/Polygons/SimplePolygons at master · 
> AbelPau/gdal (github.com) 
> <https://github.com/AbelPau/gdal/tree/master/autotest/ogr/data/miramon/Polygons/SimplePolygons>
>
> On local tests are perfectly OK (see below). So, after some days of 
> trying to figure out WHY and what is de difference between 2 and 3th 
> test I have to ask you because it must be obvious but not to me.
>
> Any idea? Some permissions stuff?? THANKS!
>
> root at f5b8c1fb00ae:/gdal/build/autotest# python3 -m pytest -vv -p 
> no:sugar --color=no ogr/ogr_miramon_vector.py
>
> ================================================= test session starts 
> ==================================================
>
> platform linux -- Python 3.10.12, pytest-8.1.1, pluggy-1.4.0 -- 
> /usr/bin/python3
>
> cachedir: .pytest_cache
>
> benchmark: 4.0.0 (defaults: timer=time.perf_counter disable_gc=False 
> min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 
> warmup=False warmup_iterations=100000)
>
> GDAL Build Info:
>
>   PAM_ENABLED: YES
>
>   OGR_ENABLED: YES
>
>   CURL_ENABLED: YES
>
>   CURL_VERSION: 7.81.0
>
>   GEOS_ENABLED: YES
>
>   GEOS_VERSION: 3.10.2-CAPI-1.16.0
>
>   PROJ_BUILD_VERSION: 8.2.1
>
>   PROJ_RUNTIME_VERSION: 8.2.1
>
>   COMPILER: GCC 11.4.0
>
> GDAL_DOWNLOAD_TEST_DATA: undefined (tests relying on downloaded data 
> may be skipped)
>
> GDAL_RUN_SLOW_TESTS: undefined (tests marked as "slow" will be skipped)
>
> rootdir: /gdal/build/autotest
>
> configfile: pytest.ini
>
> plugins: env-1.1.3, benchmark-4.0.0
>
> collected 3 items
>
> ogr/ogr_miramon_vector.py::test_ogr_miramon_simple_point 
> PASSED                                                  [ 33%]
>
> ogr/ogr_miramon_vector.py::test_ogr_miramon_simple_arc 
> PASSED                                                    [ 66%]
>
> ogr/ogr_miramon_vector.py::test_ogr_miramon_simple_polygon 
> PASSED                                                [100%]
>
> ================================================== 3 passed in 0.11s 
> ===================================================
>
> *Abel Pau Garcia*
>
> *GIS developer*
>
> 	
>
> https://www.creaf.cat/sites/default/files/creaf-signature.png
>
> *a.pau at creaf.uab.cat* <mailto:a.pau at creaf.uab.cat>
>
> *Let's chat on Teams!* 
> <https://teams.microsoft.com/l/chat/0/0?users=a.pau@creaf.uab.cat>
>
> *Tel. +34 934814277*
>
> 	
>
> https://www.creaf.cat/sites/default/files/so-en-signature.png
>
> https://www.creaf.cat/sites/default/files/twitter-icon-signature.png 
> <https://twitter.com/CREAF_ecologia>https://www.creaf.cat/sites/default/files/linkedin-icon-signature.png 
> <https://www.linkedin.com/company/1363052?trk=tyah&trkInfo=clickedVertical:company,clickedEntityId:1363052,idx:2-1-2,tarId:1465807877789,tas:creaf>https://www.creaf.cat/sites/default/files/youtube-icon-signature.png 
> <https://www.youtube.com/c/creafecologia>https://www.creaf.cat/sites/default/files/instagram-icon-signature.png 
> <https://www.instagram.com/CREAF_ecologia/>
>
> *www.creaf.cat* <http://www.creaf.cat>*| **http://blog.creaf.cat* 
> <http://blog.creaf.cat>
>
> 	
>
> https://www.creaf.cat/sites/default/files/uab_logo_signatura.png
>
> CREAF. Campus UAB. Edifici C. 08193 Bellaterra (Barcelona)
>
>
> Before printing this electronic message, think about the environment.
>
> http://www.creaf.uab.cat/_signatura/line.gif
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240312/e248ffde/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 3657 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240312/e248ffde/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 2547 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240312/e248ffde/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 505 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240312/e248ffde/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 446 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240312/e248ffde/attachment-0009.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 553 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240312/e248ffde/attachment-0010.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 582 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240312/e248ffde/attachment-0011.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.jpg
Type: image/jpeg
Size: 2208 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240312/e248ffde/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.jpg
Type: image/jpeg
Size: 1111 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240312/e248ffde/attachment-0003.jpg>


More information about the gdal-dev mailing list