Subject: backport MK_TESTS for freebsd-utils (>> 10.1~)
Origin: vendor, http://svnweb.freebsd.org/base/stable/10/share/mk/bsd.own.mk?r1=260012&r2=260013&view=patch

--- a/src/share/mk/bsd.own.mk
+++ b/src/share/mk/bsd.own.mk
@@ -376,6 +376,7 @@
     PKGTOOLS \
     SHARED_TOOLCHAIN \
     SVN \
+    TESTS \
     USB_GADGET_EXAMPLES
 
 #
@@ -555,6 +556,20 @@
 MK_LLDB:= no
 .endif
 
+.if defined(NO_TESTS)
+# This should be handled above along the handling of all other NO_*  options.
+# However, the above is broken when WITH_*=yes are passed to make(1) as
+# command line arguments.  See PR bin/183762.
+#
+# Because the TESTS option is new and it will default to yes, it's likely
+# that people will pass WITHOUT_TESTS=yes to make(1) directly and get a broken
+# build.  So, just in case, it's better to explicitly handle this case here.
+#
+# TODO(jmmv): Either fix make to allow us putting this override where it
+# belongs above or fix this file to cope with the make bug.
+MK_TESTS:= no
+.endif
+
 #
 # Set defaults for the MK_*_SUPPORT variables.
 #
