diff --git a/share/examples/tests/tests/plain/cp_test b/share/examples/tests/tests/plain/cp_test.sh old mode 100755 new mode 100644 similarity index 100% rename from share/examples/tests/tests/plain/cp_test rename to share/examples/tests/tests/plain/cp_test.sh diff --git a/share/mk/plain.test.mk b/share/mk/plain.test.mk index b41c5856c61..2e2752db7fa 100644 --- a/share/mk/plain.test.mk +++ b/share/mk/plain.test.mk @@ -46,6 +46,16 @@ _TESTS+= ${PLAIN_TESTS_SH} .for _T in ${PLAIN_TESTS_SH} SCRIPTSDIR_${_T}= ${TESTSDIR} TEST_INTERFACE.${_T}= plain +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. +PLAIN_TESTS_SH_SED_${_T}?= # empty +PLAIN_TESTS_SH_SRC_${_T}?= ${_T}.sh +${_T}: ${PLAIN_TESTS_SH_SRC_${_T}} + cat ${.ALLSRC} | sed ${PLAIN_TESTS_SH_SED_${_T}} >${.TARGET}.tmp + chmod +x ${.TARGET}.tmp + mv ${.TARGET}.tmp ${.TARGET} .endfor .endif