Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Dec 2013 03:39:50 +0000 (UTC)
From:      Julio Merino <>
Subject:   svn commit: r259208 - head/share/mk
Message-ID:  <>

Next in thread | Raw E-Mail | Index | Archive | Help
Author: jmmv
Date: Wed Dec 11 03:39:50 2013
New Revision: 259208

  This file provides support to build test programs that comply with the
  Test Anything Protocol.  Its main goal is to support the painless
  integration of existing tests from tools/regression/ into the Kyua-based
  test suite.
  Approved by:	rpaulo (mentor)

  head/share/mk/   (contents, props changed)

Modified: head/share/mk/Makefile
--- head/share/mk/Makefile	Wed Dec 11 00:39:56 2013	(r259207)
+++ head/share/mk/Makefile	Wed Dec 11 03:39:50 2013	(r259208)
@@ -46,6 +46,7 @@ FILESDIR=	${BINDIR}/mk
 .if ${MK_TESTS} != "no"
 .include <>

Added: head/share/mk/
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/share/mk/	Wed Dec 11 03:39:50 2013	(r259208)
@@ -0,0 +1,64 @@
+# $FreeBSD$
+# Logic to build and install TAP-compliant test programs.
+# This is provided to support existing tests in the FreeBSD source tree
+# (particularly those coming from tools/regression/) that comply with the
+# Test Anything Protocol.  It should not be used for new tests.
+.include <>
+# List of C, C++ and shell test programs to build.
+# Programs listed here are built according to the semantics of for
+# PROGS, PROGS_CXX and SCRIPTS, respectively.
+# Test programs registered in this manner are set to be installed into TESTSDIR
+# (which should be overriden by the Makefile) and are not required to provide a
+# manpage.
+.if !empty(TAP_TESTS_C)
+.for _T in ${TAP_TESTS_C}
+MAN.${_T}?= # empty
+SRCS.${_T}?= ${_T}.c
+.if !empty(TAP_TESTS_CXX)
+.for _T in ${TAP_TESTS_CXX}
+MAN.${_T}?= # empty
+SRCS.${_T}?= ${_T}.cc
+.if !empty(TAP_TESTS_SH)
+.for _T in ${TAP_TESTS_SH}
+CLEANFILES+= ${_T} ${_T}.tmp
+# TODO(jmmv): It seems to me that this SED and SRC functionality should
+# exist in along the support for SCRIPTS.  Move it there if
+# this proves to be useful within the tests.
+TAP_TESTS_SH_SED_${_T}?= # empty
+TAP_TESTS_SH_SRC_${_T}?= ${_T}.sh
+${_T}: ${TAP_TESTS_SH_SRC_${_T}}
+	cat ${.ALLSRC} | sed ${TAP_TESTS_SH_SED_${_T}} >${.TARGET}.tmp
+	chmod +x ${.TARGET}.tmp
+	mv ${.TARGET}.tmp ${.TARGET}
+.include <>

Want to link to this message? Use this URL: <>