Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Oct 2012 08:38:12 -0700
From:      "Simon J. Gerraty" <sjg@juniper.net>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Garrett Cooper <yanegomi@gmail.com>, freebsd-hackers@freebsd.org, freebsd-arch@freebsd.org, sjg@juniper.net
Subject:   Re: Fwd: [CFT/RFC]: refactor bsd.prog.mk to understand multiple programs instead of a singular program
Message-ID:  <20121002153812.D766B58093@chaos.jnpr.net>
In-Reply-To: <201210020750.23358.jhb@freebsd.org>
References:  <CAGH67wRkOmy7rWLkxXnT2155PuSQpwOMyu7dTAKeO1WW2dju7g@mail.gmail.com> <CDA41F27-73C1-47CF-B84D-2627B1F7E7D8@xcllnt.net> <20121001223100.E7D0D58093@chaos.jnpr.net> <201210020750.23358.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Tue, 2 Oct 2012 07:50:23 -0400, John Baldwin writes:
>BTW, one general comment.  There seem to be two completely independent
>groups of folks working on ATF (e.g. there have been two different
>imports of ATF into the tree in two different locations IIRC, and now
>we have two different sets of patches to our system makefiles).

Yes, and no.  We (Juniper) have been using ATF for some time, and were
going to do import etc, but for various reasons haven't done it yet.
In part I guess because having bmake in tree would have made things
much simpler - avoiding re-inventing wheels.

Garrett, has forged ahead, and we are fine with that - Marcel did the
import for him.  Obviously though (as I've probably just made clear) we
don't want ATF to unnecessarily complicate the build.
We hope to get the initial bmake commit done this week, and then we can
help Garrett get ATF going with minimal fuss.

>Are these two groups talking to each other at all?  

Yes, but I don't think Garrett was aware of the bmake work.

>  It seems there are some differences in
>the two approaches that merit working out to avoid a lot of wasted
>effort on both sides.

The differences are probably very minor, and hopefully easily sorted
out.  The most significant being how to build the multiple test apps in
one directory.  Related to that is the exact location.
I believe we are all agreed that tests should be co-located with the
code they exercise - to facilitate testing as you make changes.

We use a tests/ subdir per lib and prog that has unit-tests and I would
recommend doing the same.  This is consistent with the above goal, and
the separate directory is very useful for keeping the build simple -
eg. libfoo/Makefile can continue to just use bsd.lib.mk while
libfoo/tests/Makefile can use any of bsd.prog.mk, bsd.progs.mk,
bsd.test.mk or atf.test.mk

Also, these separate dirs become even more important when using meta
mode because you want the all/default target to "just do the right thing",
and do it the same way every time, to avoid churn in dependencies.

>Do we already have a freebsd-atf@ mailing list?  If not, perhaps we
>should create one and start these discussions there?

Don't know, but fine either way.

--sjg





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121002153812.D766B58093>