From a845d42777e57980e359b4df7f407d8a40bf6ea8 Mon Sep 17 00:00:00 2001 From: Julio Merino Date: Fri, 6 Jun 2014 17:53:05 +0000 Subject: [PATCH] Add the *_TESTS_SH_SED_* functionality to atf.test.mk. This exists already in plain.test.mk and tap.test.mk and should have been added to atf.test.mk too when the feature was first introduced. (It is probably time to address the related TODOs but I will do that separately.) --- share/mk/atf.test.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/share/mk/atf.test.mk b/share/mk/atf.test.mk index c82557ce976..57b90709e38 100644 --- a/share/mk/atf.test.mk +++ b/share/mk/atf.test.mk @@ -98,10 +98,14 @@ _TESTS+= ${ATF_TESTS_SH} SCRIPTSDIR_${_T}= ${TESTSDIR} TEST_INTERFACE.${_T}= atf CLEANFILES+= ${_T} ${_T}.tmp +# TODO(jmmv): It seems to me that this SED and SRC functionality should +# exist in bsd.prog.mk along the support for SCRIPTS. Move it there if +# this proves to be useful within the tests. +ATF_TESTS_SH_SED_${_T}?= # empty ATF_TESTS_SH_SRC_${_T}?= ${_T}.sh ${_T}: ${ATF_TESTS_SH_SRC_${_T}} echo '#! /usr/bin/atf-sh' > ${.TARGET}.tmp - cat ${.ALLSRC} >> ${.TARGET}.tmp + cat ${.ALLSRC} | sed ${ATF_TESTS_SH_SED_${_T}} >>${.TARGET}.tmp chmod +x ${.TARGET}.tmp mv ${.TARGET}.tmp ${.TARGET} .endfor