rfc 12: C code Unit tests

Frank Warmerdam warmerdam at POBOX.COM
Fri Mar 3 09:35:25 EST 2006


Umberto Nicoletti wrote:
> I have rewritten rfc12.
> I await your comments on it.
> 
> http://mapserver.gis.umn.edu/development/rfc/ms-rfc-12

Umberto,

You write:
"When cunit is a vailable unit tests could be run by default at the end
of the compile phase: "

I think instead there ought to be a "make test" target.  In particular,
I do not want my normal development sequence interrupted by tests running.
Instead I would prefer to do this sort of testing before doing a CVS
commit.

You write:
"The patch was created in under 6 hours by a single person,
who is not a frequent C programmer. This is meant to prove that unit
tests do not take away much time from developers and that in general
the benefit is worth the cost."

I'm not sure that your creating the patch in under six hours really
proves the point you suggest.  Overall this part left me wondering
if you appreciate the development issues of core C programmers on
mapserver and whether you are "in it for the long haul" in terms of
being the advocate of the C unit tests.

You write:
"Effort should be put toward developing a build system capable of
    1. testing the overall build/test of mapserver and of the various
       mapscripts with different configure options
    2. and integrating those results with the msautotest suite."

I'm not sure I follow what you mean here.  Is (1) about having a
build-and-smoke-test system setup somewhere that automatically builds
MapServer is a variety of configurations and runs tests nightly or
more often?  And what does "integrating those results with the msautotest
suite" mean?

I think perhaps this section should be left out of the RFC, and
addressed as a separate initiative.

Lastly, I hope you would commit to writing a README for the
unit test directory, or a page for the web site, which introduces
the specifics of how to add new tests.  Perhaps this is already
addressed in bug report.

Overall I am "+0" on your initiative.  If/when it is in place, I will
run the tests and attempt to extend them as time permits and it seems
appropriate.

I am also keen on the build-and-smoke-test server and would hope this
could be setup on OSGeo hardware that all core developers can be
given access to.  I would hope it could also be used for other
foundation projects.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org



More information about the mapserver-dev mailing list