Fixing the build with TESTS

Julio Merino julio at meroh.net
Wed Nov 6 00:18:16 UTC 2013


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?

Thanks,

-- 
Julio Merino / @jmmv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-build-atf-cxx.patch
Type: application/octet-stream
Size: 805 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-testing/attachments/20131105/7d8a60a4/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-build-bootstrap.patch
Type: application/octet-stream
Size: 3070 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-testing/attachments/20131105/7d8a60a4/attachment-0001.obj>


More information about the freebsd-testing mailing list