summaryrefslogtreecommitdiffstats
path: root/share/mk
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2015-12-27 11:04:11 +0000
committerngie <ngie@FreeBSD.org>2015-12-27 11:04:11 +0000
commitb8f4d2f02a0d97bff112a1648a2343b73356c868 (patch)
tree5644d861b5ae7efca648237781eebb4714b7e509 /share/mk
parent07bab8ce9f2bb2366d7375a733efa740ea62cb04 (diff)
downloadFreeBSD-src-b8f4d2f02a0d97bff112a1648a2343b73356c868.zip
FreeBSD-src-b8f4d2f02a0d97bff112a1648a2343b73356c868.tar.gz
MFC r292500,r292501,r292504,r292509:
r292500: Simplify Kyuafile generation logic with KYUAFILE == auto and related complexity with variables Differential Revision: https://reviews.freebsd.org/D4406 (part of a larger diff) Reviewed by: emaste, Evan Cramer <eccramer@gmail.com> Sponsored by: EMC / Isilon Storage Division r292501: Fix typo in r292500 by adding missing conditional statement Pointyhat to: ngie Differential Revision: https://reviews.freebsd.org/D4406 (part of a larger diff) Sponsored by: EMC / Isilon Storage Division r292504: Deal with another hardcoded reference to Kyuafile in the KYUAFILE == auto case Differential Revision: https://reviews.freebsd.org/D4406 (part of a larger diff) Reviewed by: emaste, Evan Cramer <eccramer@gmail.com> Sponsored by: EMC / Isilon Storage Division r292509: Clean up Kyuafile.tmp, not Kyuafile.auto.tmp Differential Revision: https://reviews.freebsd.org/D4406 (part of a larger diff) Reviewed by: emaste, Evan Cramer <eccramer@gmail.com> Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'share/mk')
-rw-r--r--share/mk/suite.test.mk25
1 files changed, 11 insertions, 14 deletions
diff --git a/share/mk/suite.test.mk b/share/mk/suite.test.mk
index 0ec905d..10bca7a 100644
--- a/share/mk/suite.test.mk
+++ b/share/mk/suite.test.mk
@@ -45,20 +45,17 @@ KYUAFILE?= auto
# hierarchy specified by this variable.
KYUA_PREFIX?= /usr/local
-.if ${KYUAFILE:tl} == "yes"
+.if ${KYUAFILE:tl} != "no"
FILES+= Kyuafile
FILESDIR_Kyuafile= ${TESTSDIR}
+.endif
-CLEANFILES+= Kyuafile.auto Kyuafile.auto.tmp
-.elif ${KYUAFILE:tl} == "auto"
-FILES+= Kyuafile.auto
-FILESDIR_Kyuafile.auto= ${TESTSDIR}
-FILESNAME_Kyuafile.auto= Kyuafile
-
-CLEANFILES+= Kyuafile.auto Kyuafile.auto.tmp
+.if ${KYUAFILE:tl} == "auto"
+CLEANFILES+= Kyuafile Kyuafile.tmp
+.endif
-.NOPATH: Kyuafile.auto
-Kyuafile.auto: Makefile
+.if ${KYUAFILE:tl} == "auto"
+Kyuafile: Makefile
@{ \
echo '-- Automatically generated by bsd.test.mk.'; \
echo; \
@@ -66,20 +63,20 @@ Kyuafile.auto: Makefile
echo; \
echo 'test_suite("${TESTSUITE}")'; \
echo; \
- } >Kyuafile.auto.tmp
+ } > ${.TARGET}.tmp
.for _T in ${_TESTS}
.if defined(.PARSEDIR)
@echo '${TEST_INTERFACE.${_T}}_test_program{name="${_T}"${TEST_METADATA.${_T}:C/$/,/:tW:C/^/, /W:C/,$//W}}' \
- >>Kyuafile.auto.tmp
+ >>${.TARGET}.tmp
.else
@echo '${TEST_INTERFACE.${_T}}_test_program{name="${_T}"${TEST_METADATA.${_T}:C/^/, /:Q:S/\\ ,/,/g:S,\\,,g}}' \
>>Kyuafile.auto.tmp
.endif
.endfor
.for _T in ${TESTS_SUBDIRS:N.WAIT}
- @echo "include(\"${_T}/Kyuafile\")" >>Kyuafile.auto.tmp
+ @echo "include(\"${_T}/${.TARGET}\")" >>${.TARGET}.tmp
.endfor
- @mv Kyuafile.auto.tmp Kyuafile.auto
+ @mv ${.TARGET}.tmp ${.TARGET}
.endif
KYUA?= ${KYUA_PREFIX}/bin/kyua
OpenPOWER on IntegriCloud