Date: Fri, 21 Mar 2014 08:36:29 +0900 From: Julio Merino <jmmv@freebsd.org> To: Alan Somers <asomers@freebsd.org> Cc: "freebsd-testing@freebsd.org" <freebsd-testing@freebsd.org>, "Kenneth D. Merry" <ken@freebsd.org> Subject: Re: ATF config variables for FreeBSD tests Message-ID: <CAFY7cWBkyBj7f3Lm6iidHoYfh4kt8Az54Rp5RdmRyOPRtmJPJg@mail.gmail.com> In-Reply-To: <CAOtMX2ji7q23fW1idcOzvZGc=Q3UBO=6bY8OYhtiSr2s7UN7Jw@mail.gmail.com> References: <CAOtMX2j8d-AQXHbmmkOca9tV-5mfEjFvBnwZMPwXHcqmgGgtDw@mail.gmail.com> <CAFY7cWC3HR_1sxjrL9ZU=xZxtonGDz3K_QJx8LZA4G4%2BOXTVNQ@mail.gmail.com> <CAOtMX2iY=Xtck3UAco-U_1r55yA2NMX0q0zoMuhPMoFi1iwVCQ@mail.gmail.com> <CAFY7cWCZ-e=251PB%2BDbG-F6UEsBNbZLexdnqoLuonL7hVcjXsg@mail.gmail.com> <CAOtMX2g2B2gbTwsuR-LGM-wi_fKzGfL%2B24yL4e0W1SEOi1gdxg@mail.gmail.com> <6BADC2BD-3C99-44F7-B6FB-6139AB8752D9@gmail.com> <CAOtMX2ji7q23fW1idcOzvZGc=Q3UBO=6bY8OYhtiSr2s7UN7Jw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 18, 2014 at 12:14 AM, Alan Somers <asomers@freebsd.org> wrote: > On Sun, Mar 16, 2014 at 10:53 AM, Garrett Cooper <yaneurabeya@gmail.com> wrote: >> /usr/tests/libexec seems logical.. > > But that's where tests for the stuff in /libexec go. If anything, I > think /usr/libexec/tests would be more appropriate. Unfortunately, > such files would share the same source location as the tests for the > stuff in /libexec. But I think it's preferable to have a confusing > source layout to a confusing installed layout. Indeed. But if this is shared supporting code, there is no reason for it to live under /usr/tests. After all, the ATF libraries are not installed inside /usr/tests and do not live in src/tests/! For C, we'd just have a libfreebsd_tests.so or similar under /usr/lib/private and put the source under src/lib/ (and its tests --of course!-- under /usr/tests/lib/private/libfreebsd_tests/). For shell, it depends on how the "libraries" look like. One option is to have some installed .sh files that get sourced at runtime within the script; the other is to just concatenate the helper code to the test programs at build time and not install the library. In the former case, we'd just install this under /usr/libexec/something; in the latter, there is nothing to install. (There is also the option that these shell libraries are actually separate binaries, of course, but then the libexec layout also applies.) And if we are concerned about the code looking like actual tests, you'd always use .subr instead of .sh for supporting code as is done in some other places (e.g. rc.subr).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFY7cWBkyBj7f3Lm6iidHoYfh4kt8Az54Rp5RdmRyOPRtmJPJg>