aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2017-08-02 22:24:08 +0000
committerEnji Cooper <ngie@FreeBSD.org>2017-08-02 22:24:08 +0000
commit47606b869eb149ebb7135d6594c3b9b9f05b9aed (patch)
tree4d40e7b6b0dd4dfd7afc194675baa3fa2896ab9d
parenteb51cdee612cda60747fb8e0d8eb8808ec54330d (diff)
downloadsrc-47606b869eb149ebb7135d6594c3b9b9f05b9aed.tar.gz
src-47606b869eb149ebb7135d6594c3b9b9f05b9aed.zip
Use MK_CHECK_USE_SANDBOX in tests/..., to deal with the fact that
tests/... is a special snowflake directory and using HAS_TESTS would result in a nasty layering violation between bsd.tests.mk and bsd.prog.mk. Add reachover Makefile.inc's which get the default value from Makefile.inc0 (inspired by gnu/usr.bin/binutils/Makefile.inc0).
Notes
Notes: svn path=/projects/make-check-sandbox/; revision=321960
-rw-r--r--tests/Makefile1
-rw-r--r--tests/Makefile.inc09
-rw-r--r--tests/etc/Makefile.inc3
-rw-r--r--tests/sys/Makefile.inc2
-rw-r--r--tests/sys/geom/class/Makefile.inc3
-rw-r--r--tests/sys/pjdfstest/Makefile.inc3
-rw-r--r--tests/sys/pjdfstest/tests/Makefile.inc3
7 files changed, 24 insertions, 0 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 0aed9cfb1b83..a8491fcb937d 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -17,4 +17,5 @@ afterinstall: install-tests-local
install-tests-local: .PHONY
${INSTALL_SYMLINK} ../local/tests ${DESTDIR}${TESTSDIR}/local
+.include "Makefile.inc0"
.include <bsd.test.mk>
diff --git a/tests/Makefile.inc0 b/tests/Makefile.inc0
new file mode 100644
index 000000000000..84e1307a2386
--- /dev/null
+++ b/tests/Makefile.inc0
@@ -0,0 +1,9 @@
+# $FreeBSD$
+
+# tests/... doesn't conform to bsd.lib.mk and bsd.prog.mk, so specify a sane
+# default for MK_CHECK_USE_SANDBOX. src.opts.mk will override the value if the
+# user sets it to no.
+MK_CHECK_USE_SANDBOX= yes
+
+.include <src.opts.mk>
+
diff --git a/tests/etc/Makefile.inc b/tests/etc/Makefile.inc
new file mode 100644
index 000000000000..2cba822015ae
--- /dev/null
+++ b/tests/etc/Makefile.inc
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+.include "${SRCTOP}/tests/Makefile.inc0"
diff --git a/tests/sys/Makefile.inc b/tests/sys/Makefile.inc
index f3418421919d..0b336d3f3ef3 100644
--- a/tests/sys/Makefile.inc
+++ b/tests/sys/Makefile.inc
@@ -1,3 +1,5 @@
# $FreeBSD$
WARNS?= 6
+
+.include "${SRCTOP}/tests/Makefile.inc0"
diff --git a/tests/sys/geom/class/Makefile.inc b/tests/sys/geom/class/Makefile.inc
new file mode 100644
index 000000000000..2cba822015ae
--- /dev/null
+++ b/tests/sys/geom/class/Makefile.inc
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+.include "${SRCTOP}/tests/Makefile.inc0"
diff --git a/tests/sys/pjdfstest/Makefile.inc b/tests/sys/pjdfstest/Makefile.inc
new file mode 100644
index 000000000000..2cba822015ae
--- /dev/null
+++ b/tests/sys/pjdfstest/Makefile.inc
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+.include "${SRCTOP}/tests/Makefile.inc0"
diff --git a/tests/sys/pjdfstest/tests/Makefile.inc b/tests/sys/pjdfstest/tests/Makefile.inc
new file mode 100644
index 000000000000..265f86d1ed55
--- /dev/null
+++ b/tests/sys/pjdfstest/tests/Makefile.inc
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+.include "../Makefile.inc"