[Tile-serving] [mod_tile] add test framework that can be run with 'make test' - refs #10 (#11)
notifications at github.com
Wed Apr 10 19:53:38 UTC 2013
This is a fresh start to having a test framework. Uses the zero-dependency https://github.com/philsquared/Catch.
Mod_tile/renderd generally is not modular or accessible as a library, so writing tests that exercise specific components by calling internal functions is blocked. Ideally the code could be refactored so that the core parts of the application are compiled into a library and have public header files. Then applications like renderd could simply provide `main`, startup code, and then link dynamically or statically to libmodtile.so. This design would make testing much more viable.
But currently this is not the design. So this test approach instead looks at stderr and tries to poke the few accessible renderd initialization functions and also starts up renderd from the command line. The idea here is that this could provide a useful starting point to ensure that good errors are thrown when invalid parameters are passed at startup and that current errors never regress.
My thought is that anyone that requests functionality be added to mod_tile could be required to write tests so that @apmon does not have to spend more time than is necessary validating that the code is correct.
You can merge this Pull Request by running:
git pull https://github.com/springmeyer/mod_tile test-framework
Or you can view, comment on it, or merge it online at:
-- Commit Summary --
* add test framework that can be run with 'make test' - refs #10
-- File Changes --
M Makefile.am (8)
A catch.hpp (6446)
M configure.ac (2)
M daemon.c (3)
A gen_tile_test.cpp (80)
-- Patch Links --
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tile-serving