Where to put test cases for stuff in /etc?

Garrett Cooper yaneurabeya at gmail.com
Fri Mar 14 13:11:55 UTC 2014


> On Mar 14, 2014, at 0:53, Julio Merino <jmmv at freebsd.org> wrote:
> 
>> On Fri, Mar 14, 2014 at 5:40 AM, Garrett Cooper <yaneurabeya at gmail.com> wrote:
>> 
>>> On Mar 13, 2014, at 13:23, asomers at gmail.com wrote:
>>> 
>>> I occasionally make changes to /etc/rc.subr and /etc/rc.d/*.  Where
>>> can I write ATF test cases for those files?  Should I create
>>> etc/tests/rc.subr_test.sh and etc/rc.d/tests/routing_test.sh ?
> 
> Tests for these would be awesome.
> 
>>    Putting it under tests/etc would be a better idea for now. The build system under etc/ is a bit of a mess...
> 
> What's the problem with putting tests in etc/tests/ and what would it
> take to fix that?

You'd need to create ad hoc make recipes that handled WITH_TEST properly, or enhance the Makefiles to use bsd.*.mk.
Cheers,
-Garrett


More information about the freebsd-testing mailing list