From owner-svn-src-user@freebsd.org Sun Dec 6 05:37:55 2015 Return-Path: Delivered-To: svn-src-user@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 B55F0A4168F for ; Sun, 6 Dec 2015 05:37:55 +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 765941241; Sun, 6 Dec 2015 05:37:55 +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 tB65bsCh058318; Sun, 6 Dec 2015 05:37:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB65bswP058316; Sun, 6 Dec 2015 05:37:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512060537.tB65bswP058316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 6 Dec 2015 05:37:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r291886 - user/ngie/make_check/share/mk X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2015 05:37:55 -0000 Author: ngie Date: Sun Dec 6 05:37:54 2015 New Revision: 291886 URL: https://svnweb.freebsd.org/changeset/base/291886 Log: - Use LOCALBASE instead of KYUA_PREFIX as it's standard in other areas of the tree and matches the ports(7) variable. - Provide an override for the directory where Kyuafile can be found. - Do a better job of documenting `make check` - Remove redundant TESTSDIR default. Modified: user/ngie/make_check/share/mk/bsd.README user/ngie/make_check/share/mk/suite.test.mk Modified: user/ngie/make_check/share/mk/bsd.README ============================================================================== --- user/ngie/make_check/share/mk/bsd.README Sun Dec 6 02:41:57 2015 (r291885) +++ user/ngie/make_check/share/mk/bsd.README Sun Dec 6 05:37:54 2015 (r291886) @@ -449,13 +449,17 @@ It has seven targets: all: build the test programs. check: - runs the test programs from the object directory; if the - Makefile does not itself define the target test, the targets - beforecheck and aftercheck may also be used to cause actions - immediately before and after the test target is executed. + runs the test programs from CHECKDIR with kyua test, if the + Makefile does not define the check target. + + The beforecheck and aftercheck targets will be invoked, if + defined, to execute commands before and after the check + target has been executed, respectively. The devel/kyua package must be installed before invoking this target. + + See CHECKDIR for more details. clean: remove the test programs and any object files. cleandir: @@ -487,6 +491,11 @@ TESTSDIR Path to the installed tests. M ${TESTSBASE}/${RELDIR:H} , e.g. /usr/tests/bin/ls when included from bin/ls/tests . +CHECKDIR The value of CHECKDIR defaults to TESTSDIR when make check is + run from the top-level directory. Conversely, the value of + CHECKDIR defaults to .OBJDIR when make check is not run from + the top-level directory. + 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 @@ -494,9 +503,9 @@ KYUAFILE If 'auto' (the default), genera subdirectories providing helper programs or data files only). -KYUA_PREFIX The --prefix for the kyua package. +LOCALBASE The --prefix for the kyua package. - The value of KYUA_PREFIX defaults to /usr/local . + The value of LOCALBASE defaults to /usr/local . ATF_TESTS_C The names of the ATF C test programs to build. Modified: user/ngie/make_check/share/mk/suite.test.mk ============================================================================== --- user/ngie/make_check/share/mk/suite.test.mk Sun Dec 6 02:41:57 2015 (r291885) +++ user/ngie/make_check/share/mk/suite.test.mk Sun Dec 6 05:37:54 2015 (r291886) @@ -8,10 +8,6 @@ .error suite.test.mk cannot be included directly. .endif -# Directory in which to install tests defined by the current Makefile. -# Makefiles have to override this to point to a subdirectory of TESTSBASE. -TESTSDIR?= . - # Name of the test suite these tests belong to. Should rarely be changed for # Makefiles built into the FreeBSD src tree. TESTSUITE?= FreeBSD @@ -54,7 +50,7 @@ KYUAFILE?= auto # If kyua is installed from ports, we automatically define a realcheck target # below to run the tests using this tool. The tools are searched for in the # hierarchy specified by this variable. -KYUA_PREFIX?= /usr/local +LOCALBASE?= /usr/local .if ${KYUAFILE:tl} != "no" FILES+= Kyuafile @@ -88,9 +84,17 @@ Kyuafile: Makefile @mv ${.TARGET}.tmp ${.TARGET} .endif -_kyuafile= ${DESTDIR}${TESTSDIR}/Kyuafile +CHECKDIR?= ${DESTDIR}${TESTSDIR} -KYUA= ${KYUA_PREFIX}/bin/kyua +KYUA= ${LOCALBASE}/bin/kyua +${KYUA}: + @echo + @echo "kyua binary not installed at expected location (${.TARGET})" + @echo + @echo "Please install via pkg install, or specify the path to the kyua" + @echo "package via the \$${LOCALBASE} variable, e.g. " + @echo "LOCALBASE=\"${LOCALBASE}\"" + @false # Definition of the "make check" target and supporting variables. # @@ -102,15 +106,6 @@ KYUA= ${KYUA_PREFIX}/bin/kyua # are used by tests, it is highly possible for a execution of "make test" to # report bogus results unless the new binaries are put in place. -${KYUA}: - @echo - @echo "kyua binary not installed at expected location (${.TARGET})" - @echo - @echo "Please install via pkg install, or specify the path to the kyua" - @echo "package via the \$${KYUA_PREFIX} variable, e.g. " - @echo "KYUA_PREFIX=\"${KYUA_PREFIX}\"" - @false - realcheck: .PHONY realcheck: ${KYUA} - @${KYUA} test -k ${DESTDIR}${TESTSDIR}/Kyuafile + @${KYUA} test -k ${CHECKDIR}/Kyuafile