summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2014-12-22 00:50:08 +0000
committerngie <ngie@FreeBSD.org>2014-12-22 00:50:08 +0000
commit964f5a1f13d80db3d2b8ac8fe918abf3835ee7d0 (patch)
treeae68de000382ee681d6030c3ce908248b4c1bb9f
parent8cd5c94ddbcb3dde3a3e9628086cf09b6e54e6b8 (diff)
downloadFreeBSD-src-964f5a1f13d80db3d2b8ac8fe918abf3835ee7d0.zip
FreeBSD-src-964f5a1f13d80db3d2b8ac8fe918abf3835ee7d0.tar.gz
MFC r273803,r273810:
r273803: Filter out TESTS_SUBDIRS already added to SUBDIR instead of blindly appending the TESTS_SUBDIRS variable to SUBDIR Duplicate directory entries can cause unexpected side effects, like installing the same files multiple times. This can be easily reproduced via the following testcase prior to this commit: SUBDIR= dir TESTS_SUBDIRS+= dir .include <bsd.test.mk> Sponsored by: EMC / Isilon Storage Division r273810: Fix the logic inversion in the previous commit by ensuring that the matched expression (:M) is empty, not the not matched (:N) is empty. The former case means we have not found the TEST_SUBDIR value in SUBDIR Reported by: rodrigc Pointyhat to: me (did not use a clean install root) Sponsored by: EMC / Isilon Storage Division
-rw-r--r--share/mk/bsd.test.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/share/mk/bsd.test.mk b/share/mk/bsd.test.mk
index 38e945e..fb841da 100644
--- a/share/mk/bsd.test.mk
+++ b/share/mk/bsd.test.mk
@@ -54,9 +54,11 @@ _TESTS=
.include <plain.test.mk>
.include <tap.test.mk>
-.if !empty(TESTS_SUBDIRS)
-SUBDIR+= ${TESTS_SUBDIRS}
+.for ts in ${TESTS_SUBDIRS}
+.if empty(SUBDIR:M${ts})
+SUBDIR+= ${ts}
.endif
+.endfor
# it is rare for test cases to have man pages
.if !defined(MAN)
OpenPOWER on IntegriCloud