[gdal-dev] Testing the driver
Andrew C Aitchison
andrew at aitchison.me.uk
Sat Feb 10 09:34:39 PST 2024
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 ?
--
Andrew C. Aitchison Kendal, UK
andrew at aitchison.me.uk
More information about the gdal-dev
mailing list