How do I prove the C routines work?

Posted by tonvoon on 29 September 2007 - 8:19pm

We use libtap to test C routines that are in lib/utils_*.c. The tests are in lib/tests/test_*.c.

To start running tests with libtap, download the latest libtap. The latest version is currently 1.01. However, there is a bug with the thread implementation. To workaround, run:


CPPFLAGS="-UHAVE_LIBPTHREAD" ./configure
make
make check
make install

Now when you run the Nagios Plugins ./configure, it should find the libtap library and compile the tests and run them when you run "make test".