From owner-svn-src-all@freebsd.org Sat Jul 4 02:37:37 2015 Return-Path: Delivered-To: svn-src-all@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 D88E59953CA; Sat, 4 Jul 2015 02:37:37 +0000 (UTC) (envelope-from jmmv@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 B33A81B49; Sat, 4 Jul 2015 02:37:37 +0000 (UTC) (envelope-from jmmv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t642bbeI012463; Sat, 4 Jul 2015 02:37:37 GMT (envelope-from jmmv@FreeBSD.org) Received: (from jmmv@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t642bb4x012462; Sat, 4 Jul 2015 02:37:37 GMT (envelope-from jmmv@FreeBSD.org) Message-Id: <201507040237.t642bb4x012462@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmmv set sender to jmmv@FreeBSD.org using -f From: Julio Merino Date: Sat, 4 Jul 2015 02:37:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285119 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2015 02:37:38 -0000 Author: jmmv Date: Sat Jul 4 02:37:36 2015 New Revision: 285119 URL: https://svnweb.freebsd.org/changeset/base/285119 Log: Add support for TEST_METADATA Allow Makefiles to define generic metadata settings that apply to all test programs defined by a Makefile. The generic TEST_METADATA variable extends the per-test program settings already supported via TEST_METADATA.. This feature will be useful to easily apply some settings to all programs in a directory. In particular, Kyua 0.12 will support parallel execution of test programs and a bunch of them will need to be tagged as is_exclusive to indicate that they cannot be run in parallel with anything else due to their side-effects. It will be reasonable to set this setting on whole directories. MFC after: 1 week Modified: head/share/mk/suite.test.mk Modified: head/share/mk/suite.test.mk ============================================================================== --- head/share/mk/suite.test.mk Sat Jul 4 02:24:47 2015 (r285118) +++ head/share/mk/suite.test.mk Sat Jul 4 02:37:36 2015 (r285119) @@ -34,12 +34,19 @@ KYUAFILE?= auto # Kyua as this is later encoded in the Kyuafile test program definitions. #TEST_INTERFACE.= interface-name +# Metadata properties applicable to all test programs. +# +# All the variables for a test program defined in the Makefile are appended +# to the test program's definition in the Kyuafile. This feature can be +# used to avoid having to explicitly supply a Kyuafile in the source +# directory, allowing the caller Makefile to rely on the KYUAFILE=auto +# behavior defined here. +#TEST_METADATA+= key="value" + # Per-test program metadata properties as a list of key/value pairs. # -# All the variables for a particular program are appended to the program's -# definition in the Kyuafile. This feature can be used to avoid having to -# explicitly supply a Kyuafile in the source directory, allowing the caller -# Makefile to rely on the KYUAFILE=auto behavior defined here. +# These per-test program settings _extend_ the values provided in the +# unqualified TEST_METADATA variable. #TEST_METADATA.+= key="value" # Path to the prefix of the installed Kyua CLI, if any. @@ -61,6 +68,10 @@ FILESNAME_Kyuafile.auto= Kyuafile CLEANFILES+= Kyuafile.auto Kyuafile.auto.tmp +.for _T in ${_TESTS} +_TEST_METADATA.${_T}= ${TEST_METADATA} ${TEST_METADATA.${_T}} +.endfor + .NOPATH: Kyuafile.auto Kyuafile.auto: Makefile @{ \ @@ -72,7 +83,7 @@ Kyuafile.auto: Makefile echo; \ } >Kyuafile.auto.tmp .for _T in ${_TESTS} - @echo '${TEST_INTERFACE.${_T}}_test_program{name="${_T}"${TEST_METADATA.${_T}:C/$/,/:tW:C/^/, /W:C/,$//W}}' \ + @echo '${TEST_INTERFACE.${_T}}_test_program{name="${_T}"${_TEST_METADATA.${_T}:C/$/,/:tW:C/^/, /W:C/,$//W}}' \ >>Kyuafile.auto.tmp .endfor .for _T in ${TESTS_SUBDIRS:N.WAIT}