[gdal-dev] Testing the driver

Even Rouault even.rouault at spatialys.com
Sun Feb 18 10:10:59 PST 2024


Le 10/02/2024 à 18:34, Andrew C Aitchison via gdal-dev a écrit :
> On Sat, 10 Feb 2024, Even Rouault via gdal-dev wrote:
>
>>
>>> To test your own development, you may have a more pleasant 
>>> experience by directly running just the tests for your driver with 
>>> something like "pytest autotest/ogr/ogr_miramon.py"  (be careful on 
>>> Windows, the content of $build_dir/autotest is copied from 
>>> $source_dir/autotest each time "cmake" is run, so if you edit your 
>>> test .py file directly in the build directory, be super careful of 
>>> not accidentally losing your work, and make sure to copy its content 
>>> to the source directory first. That's admittedly an annoying point 
>>> of the current test setup on Windows, compared to Unix where we use 
>>> symbolic links)
>>>
>> Actually Dan figured out it was possible to run directly the tests 
>> against your test file from the source directory, and not the one 
>> that is copied. Cf https://github.com/OSGeo/gdal/pull/9224
>>
>> So you can actually do from the build directory:
>>
>> pytest -c autotest/pytest.ini ../autotest/ogr/ogr_gpx.py
>
> Recent tarball releases have cmake/template/pytest.ini.in
> but how do I genenerate autotest/pytest.ini ?
It is generated by cmake
>
>
> _______________________________________________
> 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.



More information about the gdal-dev mailing list