Fixing the build with TESTS

Garrett Cooper yaneurabeya at gmail.com
Wed Nov 6 01:52:31 UTC 2013


On Tue, Nov 5, 2013 at 4:17 PM, Julio Merino <julio at meroh.net> wrote:
> Hello,
>
> The previous changes to enable the installation of tests broke the
> build and is the reason why Rui had to default the TESTS knob to 'no'.
> The reason for the breakage is the following:
>
> When buildworld starts by building the basic "bootstrap" libraries, it
> does a "make all" within various lib/* directories, including
> libcrypt. libcrypt had tests added to it, which means that "make all"
> recursed into the tests directory and attempted to build them. But, at
> that point, the atf libraries had not yet been built. I did not
> encounter this issue because I'm running builds with MK_CLEAN=no (yup,
> lesson learned).
>
> I think it's wrong for this stage of buildworld to attempt building
> tests at all. atf is just one of the many dependencies we'd encounter,
> and we should not try to build all dependencies upfront... because we
> cannot. (Just imagine when libc starts getting tests.)
>
> The fix-build-bootstrap.patch attached attempts to correct this by
> explicitly disabling the build of any tests during the initial build
> of the bootstrap components.  I'm not sure this patch is nice enough,
> although it follows the style of various other related knobs; if you
> have better ideas, please share.
>
> Additionally, we will encounter similar issues once we have tests that
> use C++ (which we will, if only because of libatf-c++'s tests), so we
> should also do what fix-build-atf-cxx.patch proposes.
>
> Thoughts?

I fixed this on my branch some time ago. See this patch for more
details (from http://lists.freebsd.org/pipermail/freebsd-toolchain/2013-April/000804.html
) : http://lists.freebsd.org/pipermail/freebsd-toolchain/attachments/20130424/c44daa61/attachment.obj
.

If you change the former patch to refer to lib/atf instead of
lib/atf/libatf-c, things will just work too is the order is properly
specified in lib/atf :).

I've attached entire up-to-date patch set, just for simplicity.

Thanks!
-Garrett
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bsd.own.mk-patch
Type: application/octet-stream
Size: 576 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-testing/attachments/20131105/79cfa282/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bsd.subdir.mk-patch
Type: application/octet-stream
Size: 417 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-testing/attachments/20131105/79cfa282/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile.inc1-patch
Type: application/octet-stream
Size: 2409 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-testing/attachments/20131105/79cfa282/attachment-0002.obj>


More information about the freebsd-testing mailing list