From d7efee230d547e18675348e20eb131c10e8246ff Mon Sep 17 00:00:00 2001 From: Julio Merino Date: Fri, 10 Jan 2014 10:36:14 +0000 Subject: [PATCH] Allow tests to provide a Kyuafile when they relied on auto-generation. When generating a Kyuafile in the KYUAFILE=auto case, use a filename that is unlikely to clash with the filename used by explicitly-provided Kyuafiles. This allows a Makefile to set KYUAFILE=yes and provide a Kyuafile in the same directory when such Makefile was previously relying on KYUAFILE=auto. Fixes issues with new Kyuafiles not being picked up in NO_CLEAN builds (although manual intervention is required once, unfortunately, as described in UPDATING). Reviewed by: sjg MFC after: 1 week --- UPDATING | 8 ++++++++ share/mk/bsd.test.mk | 23 ++++++++++++++--------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/UPDATING b/UPDATING index d79c131a3497..69eda4102d5a 100644 --- a/UPDATING +++ b/UPDATING @@ -31,6 +31,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20140110: + If a Makefile in a tests/ directory was auto-generating a Kyuafile + instead of providing an explicit one, this would prevent such + Makefile from providing its own Kyuafile in the future during + NO_CLEAN builds. This has been fixed in the Makefiles but manual + intervention is needed to clean an objdir if you use NO_CLEAN: + # find /usr/obj -name Kyuafile | xargs rm -f + 20131213: The behavior of gss_pseudo_random() for the krb5 mechanism has changed, for applications requesting a longer random string diff --git a/share/mk/bsd.test.mk b/share/mk/bsd.test.mk index 8cdf91448e3a..01d74b538901 100644 --- a/share/mk/bsd.test.mk +++ b/share/mk/bsd.test.mk @@ -79,14 +79,20 @@ WITHOUT_MAN=yes PROG_VARS+= BINDIR PROGS_TARGETS+= install -.if ${KYUAFILE:tl} != "no" +.if ${KYUAFILE:tl} == "yes" FILES+= Kyuafile FILESDIR_Kyuafile= ${TESTSDIR} -.if ${KYUAFILE:tl} == "auto" -CLEANFILES+= Kyuafile Kyuafile.tmp +CLEANFILES+= Kyuafile.auto Kyuafile.auto.tmp +.elif ${KYUAFILE:tl} == "auto" +FILES+= Kyuafile.auto +FILESDIR_Kyuafile.auto= ${TESTSDIR} +FILESNAME_Kyuafile.auto= Kyuafile -Kyuafile: Makefile +CLEANFILES+= Kyuafile.auto Kyuafile.auto.tmp + +.NOPATH: Kyuafile.auto +Kyuafile.auto: Makefile @{ \ echo '-- Automatically generated by bsd.test.mk.'; \ echo; \ @@ -94,16 +100,15 @@ Kyuafile: Makefile echo; \ echo 'test_suite("${TESTSUITE}")'; \ echo; \ - } >Kyuafile.tmp + } >Kyuafile.auto.tmp .for _T in ${_TESTS} @echo "${TEST_INTERFACE.${_T}}_test_program{name=\"${_T}\"}" \ - >>Kyuafile.tmp + >>Kyuafile.auto.tmp .endfor .for _T in ${TESTS_SUBDIRS:N.WAIT} - @echo "include(\"${_T}/Kyuafile\")" >>Kyuafile.tmp + @echo "include(\"${_T}/Kyuafile\")" >>Kyuafile.auto.tmp .endfor - @mv Kyuafile.tmp Kyuafile -.endif + @mv Kyuafile.auto.tmp Kyuafile.auto .endif KYUA?= ${KYUA_PREFIX}/bin/kyua