[OPEN-ILS-DEV] OpenSRF - C Unit Testing
Dan Scott
dan at coffeecode.net
Sun Apr 24 22:33:30 EDT 2011
On 11 April 2011 12:10, Kevin Beswick <kevinbeswick00 at gmail.com> wrote:
> Hello,
>
> Attached is a patch which puts a C unit testing framework in place for
> OpenSRF, as well as a bunch of tests for libopensrf. The unit testing
> framework is called "Check" - http://check.sourceforge.net/
This is great, Kevin!
Minor nit: rather than "PKG_CHECK_MODULES([CHECK]..." in configure.ac,
use "PKG_CHECK_MODULES([Check]..." so that in config.log the output
will show "checking for Check" (the actual package name) instead of
"checking for CHECK". (Side effect: CHECK_CFLAGS / CHECK_LIBS needs to
be changed to Check_CFLAGS / Check_LIBS respectively).
> These tests can be executed by running 'make check' after you
> configure and compile the OpenSRF code.
Tested and works on Fedora 14. Nice!
> To run them, you must have the 'check' package installed. I have added
> an entry for Debian based OSes into Makefile.install, and would
> appreciate if anyone running other distros can add the appropriate
> entries for those as well.
For Fedora, one needs to install the "check" and "check-devel"
packages. Is this code in a DVCS branch somewhere so that we can fork
and ask you to pull minor enhancements like that?
> For more information on the framework, check out the Check manual at
> http://check.sourceforge.net/doc/check_html/index.html. Also I will
> soon create a Unit Testing area on the wiki with info about unit
> testing in Evergreen/OpenSRF.
We will need a DCO for this
(http://evergreen-ils.org/dokuwiki/doku.php?id=contributing#developer_s_certificate_of_origin),
but I think it's very close to being able to be merged.
More information about the Open-ils-dev
mailing list