From owner-svn-src-stable@freebsd.org Tue Dec 15 17:58:11 2015 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 902C8A48E58; Tue, 15 Dec 2015 17:58:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D3231848; Tue, 15 Dec 2015 17:58:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBFHwA4j028560; Tue, 15 Dec 2015 17:58:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBFHwAOc028557; Tue, 15 Dec 2015 17:58:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512151758.tBFHwAOc028557@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 15 Dec 2015 17:58:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r292278 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Dec 2015 17:58:11 -0000 Author: ngie Date: Tue Dec 15 17:58:10 2015 New Revision: 292278 URL: https://svnweb.freebsd.org/changeset/base/292278 Log: MFC r284408,r289151,r289158: r284408: Ensure TESTSDIR is defined before bsd.test.mk is .include'd r289151: Simplify netbsd-tests.test.mk - projects/bmake and subsequent commits provide SRCTOP; there's no need to manually specify it now. - Compute a sane default for OBJTOP based on .OBJDIR and RELDIR. Manually specifying this is probably no longer needed, but it persists just in case (supporting commits will need to be made to move it out of some of the meta .mk files). - Compute a sane default for TESTSRC. Error out if the path cannot be found. Sponsored by: EMC / Isilon Storage Division r289158: Default TESTSDIR to /usr/tests/${RELDIR:H} When run from bin/ls/tests, for example, the value of TESTSDIR would be ${TESTSBASE}/${RELDIR:H} -> /usr/tests/bin/ls/tests/.. -> /usr/tests/bin/ls Document the new behavior in bsd.README. While here, also document TESTSBASE Relnotes: yes Differential Revision: D1022 Sponsored by: EMC / Isilon Storage Division Modified: stable/10/share/mk/bsd.README stable/10/share/mk/bsd.test.mk stable/10/share/mk/netbsd-tests.test.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.README ============================================================================== --- stable/10/share/mk/bsd.README Tue Dec 15 17:25:00 2015 (r292277) +++ stable/10/share/mk/bsd.README Tue Dec 15 17:58:10 2015 (r292278) @@ -425,10 +425,16 @@ It has seven targets: It sets/uses the following variables, among many others: -TESTDIR Path to the installed tests. Must be a subdirectory of +TESTSBASE Installation prefix for tests. Defaults to /usr/tests + +TESTSDIR Path to the installed tests. Must be a subdirectory of TESTSBASE and the subpath should match the relative location of the tests within the src tree. + The value of TESTSDIR defaults to + ${TESTSBASE}/${RELDIR:H} , e.g. /usr/tests/bin/ls when + included from bin/ls/tests . + KYUAFILE If 'auto' (the default), generate a Kyuafile out of the test programs defined in the Makefile. If 'yes', then a manually-crafted Kyuafile must be supplied with the Modified: stable/10/share/mk/bsd.test.mk ============================================================================== --- stable/10/share/mk/bsd.test.mk Tue Dec 15 17:25:00 2015 (r292277) +++ stable/10/share/mk/bsd.test.mk Tue Dec 15 17:58:10 2015 (r292278) @@ -10,6 +10,9 @@ ____: +# Tests install directory +TESTSDIR?= ${TESTSBASE}/${RELDIR:H} + # List of subdirectories containing tests into which to recurse. This has the # same semantics as SUBDIR at build-time. However, the directories listed here # get registered into the run-time test suite definitions so that the test Modified: stable/10/share/mk/netbsd-tests.test.mk ============================================================================== --- stable/10/share/mk/netbsd-tests.test.mk Tue Dec 15 17:25:00 2015 (r292277) +++ stable/10/share/mk/netbsd-tests.test.mk Tue Dec 15 17:58:10 2015 (r292278) @@ -3,16 +3,12 @@ .if !target(__netbsd_tests.test.mk__) __netbsd_tests.test.mk__: -.if !defined(OBJTOP) -.error "Please define OBJTOP to the absolute path of the top of the object tree" -.endif +OBJTOP?= ${.OBJDIR:S/${RELDIR}//} -.if !defined(SRCTOP) -.error "Please define SRCTOP to the absolute path of the top of the source tree" -.endif +TESTSRC?= ${SRCTOP}/contrib/netbsd-tests/${RELDIR:H} -.if !defined(TESTSRC) -.error "Please define TESTSRC to the absolute path of the test sources, e.g. contrib/netbsd-tests/lib/libc/stdio" +.if !exists(${TESTSRC}/) +.error "Please define TESTSRC to the absolute path of the test sources, e.g. $${SRCTOP}/contrib/netbsd-tests/lib/libc/stdio" .endif .PATH: ${TESTSRC}