svn commit: r260632 - head/share/mk
Julio Merino
jmmv at FreeBSD.org
Tue Jan 14 18:32:48 UTC 2014
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.<program> 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.<test-program>= 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.<test-program>+= 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}
More information about the svn-src-all
mailing list