<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 19 May 2009, at 23:54, Andreas Ericsson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Go right ahead imo.<br></div></blockquote></div><br><div>OK, libtap is now included. I've updated the developer documentation so that it includes general information about testing and how it all fits together:</div><div>  <a href="http://community.nagios.org/wiki/index.php/Developer_Guidelines#Testing">http://community.nagios.org/wiki/index.php/Developer_Guidelines#Testing</a></div><div><br></div><div>As an example, I've added in testing for the logging.c:rotate_log_file subroutine in t-tap/test_logging.c. I've also merged in a patch from the Opsview version of Nagios where the nagios.log file is recreated after a rotate and is given the same permissions as the existing nagios.log (required in Opsview due to security reasons). The last test in test_logging.c fails before the patch, but now works correctly with the patch.</div><div><br></div><div>Take a look at test_logging.c for how to write tests and how to pass dummy data in and checking for correctness.</div><div><br></div><div>As of now, running "make test" does 47 tests which all pass. And only takes 1.5s on my macbook to run. Hooray!</div><div><br></div><div>Can I encourage all developers and all patch submitters to include test cases with their changes to beef up the testing.</div><div><br></div><div>Let me know if there are any problems because I am super keen on adding more testing into Nagios.</div><div><br></div><div>Ton</div><div><br></div></body></html>