Author: ngie
Date: Tue Oct 28 23:01:09 2014
New Revision: 273803
URL: https://svnweb.freebsd.org/changeset/base/273803
Log:
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
Modified:
head/share/mk/bsd.test.mk
Modified: head/share/mk/bsd.test.mk
==============================================================================
--- head/share/mk/bsd.test.mk Tue Oct 28 22:14:31 2014 (r273802)
+++ head/share/mk/bsd.test.mk Tue Oct 28 23:01:09 2014 (r273803)
@@ -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:N${ts})
+SUBDIR+= ${ts}
.endif
+.endfor
# it is rare for test cases to have man pages
.if !defined(MAN)
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"