Date: Thu, 27 Mar 2014 16:52:28 -0600 From: Alan Somers <asomers@freebsd.org> To: "Peel, Casey" <casey.peel@isilon.com> Cc: "freebsd-testing@freebsd.org" <freebsd-testing@freebsd.org> Subject: Re: Makefiles for skip-level directories? Message-ID: <CAOtMX2iyZhz8CGBAuAw4T7Bjrh5oQWWTWz6QPyoDHwe%2BgFE%2BAw@mail.gmail.com> In-Reply-To: <16437CC5729B5345AF77F816513376E8129868F1@MX103CL02.corp.emc.com> References: <16437CC5729B5345AF77F816513376E8129868F1@MX103CL02.corp.emc.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Mar 27, 2014 at 4:25 PM, Peel, Casey <casey.peel@isilon.com> wrote: > We've created some ATF network tests in sys/net/, which involved creating= the sys/net/tests directory and sys/net/tests/Makefile. There are currentl= y no tests under sys/ at all. In order for that Makefile to get picked up b= y the build, I added sys/net/Makefile that looks like this: > # $FreeBSD$ > .include <bsd.own.mk> > .if ${MK_TESTS} !=3D "no" > SUBDIR+=3D tests > .endif > .include <bsd.subdir.mk> > > For that to get picked up, I added this to sys/Makefile before .include <= bsd.subdir.mk>: > .if ${MK_TESTS} !=3D "no" > SUBDIR+=3D net > .endif > > My tests build and get installed correctly in /usr/tests: > [root@system /usr/tests]# find sys > sys > sys/net > sys/net/t_lagg_smoke > sys/net/Kyuafile What command are you using to build and install the tests? It is inappropriate to do this as part of buildkernel, because you could have multiple kernel configs installed on one machine, each build with different options. But there's no way to install ATF tests for different kernel configs. I tried putting tests in sys/kern/tests and building them with buildworld, but I had to hack up Makefile.inc1. In a thread in January, we agreed not to put any tests in sys/. Instead, we'll put them in tests/sys. Take a look at tests/sys/netinet; you can probably copy its structure for your tests. http://lists.freebsd.org/pipermail/freebsd-testing/2014-January/000134.html -Alan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2iyZhz8CGBAuAw4T7Bjrh5oQWWTWz6QPyoDHwe%2BgFE%2BAw>