Subject: Re: Building multiple progs from a single directory
To: David Laight <firstname.lastname@example.org>
From: Julio M. Merino Vidal <email@example.com>
Date: 07/08/2007 21:47:37
On 08/07/2007, at 21:12, David Laight wrote:
> On Sun, Jul 08, 2007 at 05:34:54PM +0200, Julio M. Merino Vidal wrote:
>> [ Please CC me any replies ]
>> [ CCing Marting because he is my SoC mentor ]
>> It seems to me that keeping
>> each test program in its own directory will be overkill, given that
>> test programs should be fine-grained and thus there will be many of
> Are you sure that multiple test programs is the way to go?
> You'll almost certainly end up with a lot of replicated and/or
> red tape code that makes the actual test difficult to see.
> Any changes to the infrastucture will then need making to every clone
> of the test program.
> Certainly you want to be also to run each test separately, but that
> doesn't require one program per test.
But it makes sense to keep them separate, in some cases.
Furthermore, it's up to the person developing the tests to write them
as a single program or multiple ones, so he can choose what better
suits his needs. (For an example see src/regress/sys/fs/tmpfs; I
think those different test programs make sense, and collapsing them
all into a single one could be confusing.)
Anyway, that doesn't mean that code is duplicated among the tests.
I'm keeping all the infrastructure centralized so that the test
program's code is minimal. Test programs written in C/C++ rely on a
shared library, and test programs written in sh include a file that
lives in share.
>> Following the current principle of one program per source directory
>> will make our source tree explode in the number of required inodes to
>> host it -- an extra Makefile plus a directory for each of these tiny
> Given the extra directories (etc) would be subdirectories of a single
> program why is this an issue?
I'm not sure I understand you here. The current layout I have looks
calypso:~/Projects/NetBSD/src/tests> find .