Date: Wed, 24 Apr 2013 11:23:08 -0500 From: Brooks Davis <brooks@freebsd.org> To: Garrett Cooper <yaneurabeya@gmail.com> Cc: arch@freebsd.org, "Simon J. Gerraty" <sjg@juniper.net>, benno@freebsd.org, toolchain@freebsd.org Subject: Re: [RFC] [Optionally] build tests with buildworld Message-ID: <20130424162307.GA16731@lor.one-eyed-alien.net> In-Reply-To: <FE0C5382-DC03-4272-B497-EE9884BC7C2F@gmail.com> References: <CAGHfRMCTRM4sFS09jLp3DegJ5U0xujHmaw0YuAW1JTOuTqHGaw@mail.gmail.com> <20130423165958.GA91607@lor.one-eyed-alien.net> <1D2E12CF-08F2-4151-AB33-84C4270CFBC6@gmail.com> <FE0C5382-DC03-4272-B497-EE9884BC7C2F@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--qlTNgmc+xy1dBmNv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 24, 2013 at 09:15:30AM -0700, Garrett Cooper wrote: >=20 > On Apr 23, 2013, at 10:28 AM, Garrett Cooper wrote: >=20 > > On Apr 23, 2013, at 9:59 AM, Brooks Davis wrote: > >=20 > >> On Fri, Apr 19, 2013 at 11:17:50PM -0700, Garrett Cooper wrote: > >>> Hi arch@ and toolchain@, > >>> One of the items that I'm proposing be added to Makefile.inc1 in > >>> order to make building and installing tests on CURRENT (ATF and > >>> otherwise) is a build knob called TESTS_WITH_WORLD (the name can be > >>> modified), which allows me to build and install various tests on my > >>> git branch like the example ATF tests I produced, pjdfstest, some of > >>> the prove tests from tools/regression, etc (there are other > >>> outstanding changes, but this was the key one that I need feedback on > >>> just to be safe). > >>=20 > >> I don't understand way you don't use WITH_TESTS processed > >> through bsd.own.mk. You'd presumably have to add it to the list of > >> supported NO_* options for the bootstrap case, but that's trivial. Th= en > >> you use could use normal MK_* variables. That would also let you use > >> WITH(OUT)_TESTS in individual directories and they would always work. > >>=20 > >> At a glance using WITHOUT_TESTS and NO_TEST internally would simplify > >> some of the special cases in your patch. > >=20 > > This is something that I considered, but I wasn't sure that it was the = best route to go about things because I thought we were doing away/had done= away with most of the NO_* knobs (and unfortunately one cannot mix and mat= ch WITH_* and WITHOUT_* because they're considered contradictory according = to bsd.own.mk -- something that Simon has debated against having in the pas= t). > >=20 > > I'm all for doing that though because that would simplify things greatl= y from an end-user perspective. >=20 > Hi Brooks! > Does this look ok? Most of the MK_TESTS logic has been shoved into bsd.o= wn.mk and NO_TESTS is sprinkled around Makefile.inc1 as recommended. > Thanks! > -Garrett The functional parts seem fine. Some comments below. -- Brooks > Index: Makefile.inc1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- Makefile.inc1 (revision 249833) > +++ Makefile.inc1 (working copy) > @@ -91,6 +91,9 @@ > .if ${MK_OFED} !=3D "no" > SUBDIR+=3Dcontrib/ofed > .endif > +.if ${MK_TESTS} !=3D "no" > +SUBDIR+=3Dtests > +.endif > # > # We must do etc/ last for install/distribute to work. > # > @@ -253,7 +256,8 @@ > SSP_CFLAGS=3D \ > -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \ > -DNO_PIC -DNO_PROFILE -DNO_SHARED \ > - -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD > + -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD \ > + -DNO_TESTS \ The trailing backslash may be a good idea, but is inconsistant with all the Makefiles in the system. If you want to make that change is should discussed seperately. > =20 > # build-tools stage > TMAKE=3D MAKEOBJDIRPREFIX=3D${OBJTREE} \ > @@ -263,12 +267,14 @@ > BOOTSTRAPPING=3D${OSRELDATE} \ > SSP_CFLAGS=3D \ > -DNO_LINT \ > - -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD > + -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD \ > + -DNO_TESTS \ > =20 > # cross-tools stage > XMAKE=3D TOOLS_PREFIX=3D${WORLDTMP} ${BMAKE} \ > TARGET=3D${TARGET} TARGET_ARCH=3D${TARGET_ARCH} \ > - -DWITHOUT_GDB > + -DWITHOUT_GDB \ > + -DNO_TESTS \ > =20 > # world stage > WMAKEENV=3D ${CROSSENV} \ > @@ -343,7 +349,8 @@ > -DLIBRARIES_ONLY \ > -DNO_CPU_CFLAGS \ > -DNO_CTF \ > - -DNO_LINT > + -DNO_LINT \ > + -DNO_TESTS \ > =20 > LIB32WMAKE=3D ${LIB32WMAKEENV} ${MAKE} ${LIB32WMAKEFLAGS} \ > -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO -DWITHOUT_HTML > @@ -489,7 +496,7 @@ > @echo "--------------------------------------------------------------" > ${_+_}cd ${.CURDIR}; \ > ${WMAKE} -DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \ > - -DWITHOUT_MAN -DNO_PROFILE libraries > + -DWITHOUT_MAN -DNO_PROFILE -DNO_TESTS libraries > _depend: > @echo > @echo "--------------------------------------------------------------" > @@ -1734,6 +1741,7 @@ > NOFUN=3D-DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \ > -DWITHOUT_MAN -DWITHOUT_NLS -DNO_PROFILE \ > -DWITHOUT_KERBEROS -DWITHOUT_RESCUE -DNO_WARNS \ > + -DNO_TESTS \ This could be on the previous line. > TARGET=3D${XDEV} TARGET_ARCH=3D${XDEV_ARCH} \ > CPUTYPE=3D${XDEV_CPUTYPE} > =20 > Index: share/mk/bsd.own.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- share/mk/bsd.own.mk (revision 249833) > +++ share/mk/bsd.own.mk (working copy) > @@ -376,8 +376,16 @@ > NAND \ > OFED \ > OPENSSH_NONE_CIPHER \ > - SHARED_TOOLCHAIN > + SHARED_TOOLCHAIN \ > =20 > +# bsd.test.mk doesn't work with !bmake. Also don't build tests if NO_TES= TS is > +# defined; this is for buildworld and elsewhere (ports potentially). > +.if defined(.PARSEDIR) && !defined(NO_TESTS) > +__DEFAULT_NO_OPTIONS+=3DTESTS > +.else > +MK_TESTS:=3D no > +.endif > + > # > # Default behaviour of some options depends on the architecture. Unfort= unately > # this means that we have to test TARGET_ARCH (the buildworld case) as w= ell --qlTNgmc+xy1dBmNv Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFReAbrXY6L6fI4GtQRAtQLAKCJlwevJyNpfBkiUqSIS8T23KW/JwCfYyM1 1VrPW+NyFlhJ9UJw8cow4m4= =FV/q -----END PGP SIGNATURE----- --qlTNgmc+xy1dBmNv--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130424162307.GA16731>