atf.test: fix installation of python test scripts

Python test scripts get processed (to add the `#! /usr/libexec/
atf_pytest_wrapper` shebang line), into a .xtmp file, and installed from
there. However, as there was no dependency of this .xtmp file on the
original file we kept reinstalling the .xtmp file, even if the original
had been edited already.

This could cause great confusion when debugging python test scripts.

Reviewed by:	markj
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D43118
This commit is contained in:
Kristof Provost 2023-12-19 14:15:48 +01:00
parent 636592343c
commit ec6682ed6c

View file

@ -143,7 +143,7 @@ CLEANFILES+= ${_T} ${_T}.tmp
# this proves to be useful within the tests.
ATF_TESTS_PYTEST_SED_${_T}?= # empty
ATF_TESTS_PYTEST_SRC_${_T}?= ${.CURDIR}/${_T:S,.xtmp$,,}
${_T}:
${_T}: ${_T:S/.xtmp//}
echo "#! /usr/libexec/atf_pytest_wrapper -P ${TESTSBASE}" > ${.TARGET}.tmp
.if empty(ATF_TESTS_PYTEST_SED_${_T})
cat ${ATF_TESTS_PYTEST_SRC_${_T}} >>${.TARGET}.tmp