diff options
Diffstat (limited to 'web/input/doc/faq/libtap.md')
| -rw-r--r-- | web/input/doc/faq/libtap.md | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/web/input/doc/faq/libtap.md b/web/input/doc/faq/libtap.md new file mode 100644 index 0000000..29cd357 --- /dev/null +++ b/web/input/doc/faq/libtap.md | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | title: libtap | ||
| 2 | parent: FAQ | ||
| 3 | --- | ||
| 4 | |||
| 5 | # How do I prove the C routines work? | ||
| 6 | |||
| 7 | We use [libtap][libtap] to test C routines that are in `lib/utils_*.c`. The | ||
| 8 | tests are in `lib/tests/test_*.c`. | ||
| 9 | |||
| 10 | The latest libtap version is currently 1.01. However, there is a bug with the | ||
| 11 | thread implementation. To workaround, run: | ||
| 12 | |||
| 13 | CPPFLAGS="-UHAVE_LIBPTHREAD" ./configure | ||
| 14 | make | ||
| 15 | make check | ||
| 16 | make install | ||
| 17 | |||
| 18 | Now when you run the Nagios Plugins `./configure` script, it should find the | ||
| 19 | libtap library and compile the tests and run them when you run `make` `test`. | ||
| 20 | |||
| 21 | *Update:* These days, the Nagios Plugins tarball includes a copy of libtap | ||
| 22 | which is used if you run `./configure` `--enable-libtap`. | ||
| 23 | |||
| 24 | [libtap]: http://jc.ngo.org.uk/trac-bin/trac.cgi/wiki/LibTap "libtap" | ||
| 25 | |||
| 26 | <!--% # vim:set filetype=markdown textwidth=78 joinspaces: # %--> | ||
