From owner-freebsd-testing@FreeBSD.ORG Thu Mar 27 22:52:30 2014 Return-Path: Delivered-To: freebsd-testing@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04E6FC5 for ; Thu, 27 Mar 2014 22:52:30 +0000 (UTC) Received: from mail-vc0-x232.google.com (mail-vc0-x232.google.com [IPv6:2607:f8b0:400c:c03::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B7C2D1F8 for ; Thu, 27 Mar 2014 22:52:29 +0000 (UTC) Received: by mail-vc0-f178.google.com with SMTP id im17so5056100vcb.37 for ; Thu, 27 Mar 2014 15:52:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=isZ0dD0vd38XqrLkHVJh1/s0LY61/itptrxbV9AVzWg=; b=WjF+dEoo/q7GqJHj1SgL6plUDz/FE0owUY48/CjYhp/RzBWNCI+h0FQl4zG9bpGQJH qs8liljIXddKJMYGWEibpq3MAAAQMQuNT8r9WwfONgmrpg91/+pM57D8fuIw/gwUwcWx eZYFzKOZjI7YWrcgmgQMUAFqJmmuQInfaSr9/EqMEJDE6V0skC5K+r7UBIyrhmTb5HhW cwFnHB2ylw6aF6/02cVIc6x5V9eh1B3RqZXlx0pteivBYbSyBdaRjJxcEyL7ZPzOHcDy XxR8ecX5EGLuhA1NIebcsDmWUfJ5UyfJ9DXNWcfqyQoyoaZc0RKaW7goQd4n11iS9c2x +Ejg== MIME-Version: 1.0 X-Received: by 10.52.119.197 with SMTP id kw5mr3132916vdb.5.1395960748845; Thu, 27 Mar 2014 15:52:28 -0700 (PDT) Sender: asomers@gmail.com Received: by 10.58.207.169 with HTTP; Thu, 27 Mar 2014 15:52:28 -0700 (PDT) In-Reply-To: <16437CC5729B5345AF77F816513376E8129868F1@MX103CL02.corp.emc.com> References: <16437CC5729B5345AF77F816513376E8129868F1@MX103CL02.corp.emc.com> Date: Thu, 27 Mar 2014 16:52:28 -0600 X-Google-Sender-Auth: aqL3WRBKW8usWWDDGq9CTd6ECEA Message-ID: Subject: Re: Makefiles for skip-level directories? From: Alan Somers To: "Peel, Casey" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-testing@freebsd.org" X-BeenThere: freebsd-testing@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Testing on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 22:52:30 -0000 On Thu, Mar 27, 2014 at 4:25 PM, Peel, Casey 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 > .if ${MK_TESTS} !=3D "no" > SUBDIR+=3D tests > .endif > .include > > 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