From owner-svn-src-all@FreeBSD.ORG Tue Jan 14 18:32:48 2014 Return-Path: Delivered-To: svn-src-all@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 8EF8EC7B; Tue, 14 Jan 2014 18:32:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 635721212; Tue, 14 Jan 2014 18:32:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0EIWmqJ091753; Tue, 14 Jan 2014 18:32:48 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0EIWm10091752; Tue, 14 Jan 2014 18:32:48 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201401141832.s0EIWm10091752@svn.freebsd.org> From: Julio Merino Date: Tue, 14 Jan 2014 18:32:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260632 - 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.17 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: Tue, 14 Jan 2014 18:32:48 -0000 Author: jmmv Date: Tue Jan 14 18:32:47 2014 New Revision: 260632 URL: http://svnweb.freebsd.org/changeset/base/260632 Log: Support defining test program metadata from the Makefiles. Introduce a new, per-test-program TEST_METADATA. variable that contains a list of key/value paris describing metadata properties for that test program. These properties are later written into the auto-generated Kyuafile when using the KYUAFILE=auto functionality. This is to avoid having to supply hand-crafted Kyuafiles when the needs for metadata overrides are trivial. While doing this, and because I am documenting TEST_METADATA, take the chance to document the TEST_INTERFACE setting as well. MFC after: 5 days Modified: head/share/mk/bsd.test.mk Modified: head/share/mk/bsd.test.mk ============================================================================== --- head/share/mk/bsd.test.mk Tue Jan 14 16:18:45 2014 (r260631) +++ head/share/mk/bsd.test.mk Tue Jan 14 18:32:47 2014 (r260632) @@ -41,6 +41,20 @@ TESTS_SUBDIRS?= # If 'no', no Kyuafile is installed. KYUAFILE?= auto +# Per-test program interface definition. +# +# The name provided here must match one of the interface names supported by +# Kyua as this is later encoded in the Kyuafile test program definitions. +#TEST_INTERFACE.= interface-name + +# 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. +#TEST_METADATA.+= key="value" + # List of variables to pass to the tests at run-time via the environment. TESTS_ENV?= @@ -102,7 +116,7 @@ Kyuafile.auto: Makefile echo; \ } >Kyuafile.auto.tmp .for _T in ${_TESTS} - @echo "${TEST_INTERFACE.${_T}}_test_program{name=\"${_T}\"}" \ + @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}