[gdal-dev] Testing the driver

Even Rouault even.rouault at spatialys.com
Fri Feb 9 15:43:59 PST 2024


> 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

-- 
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/20240210/d43bd757/attachment.htm>


More information about the gdal-dev mailing list