[gdal-dev] Running Tests
Even Rouault
even.rouault at spatialys.com
Tue Sep 26 07:27:59 PDT 2017
On mardi 26 septembre 2017 15:08:09 CEST Joaquim Luis wrote:
> >> P.S. - It seems strange to use python as a CI interface to a C/C++
> >>
> >> library. Is there a reason the test harness isn't in C/C++?
> >
> > Mateusz already answered on that. Writing Python tests is faster/easier
> > than C/C++ ones. We/I tend to limit C/C++ written tests to part of the
> > API not available >through the Python API.
>
> That's where Julia might help. From Julia we can call any of the C
> functions directly from the gdal lib without needing to compile anything.
> There is this Julia wrapper https://github.com/visr/GDAL.jl but I confess
> that never used it and it probably does not provide wrappers to all
> functions. Bur new ones are not difficult to write.
Actually there's a similar mechanism in Python with the ctypes module:
https://docs.python.org/3/library/ctypes.html
I had used it a bit. For example in
https://trac.osgeo.org/gdal/browser/trunk/autotest/gcore/testnonboundtoswig.py#L166
Downside of this approach is that if you could get the function prototype wrong
and a runtime crash, as there's no checking against the .h files.
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170926/34f6a757/attachment.html>
More information about the gdal-dev
mailing list