aboutsummaryrefslogtreecommitdiff
path: root/cddl
diff options
context:
space:
mode:
Diffstat (limited to 'cddl')
-rw-r--r--cddl/Makefile6
-rw-r--r--cddl/lib/Makefile7
-rw-r--r--cddl/lib/tests/Makefile10
-rw-r--r--cddl/sbin/Makefile6
-rw-r--r--cddl/sbin/tests/Makefile10
-rw-r--r--cddl/tests/Makefile10
-rw-r--r--cddl/usr.bin/Makefile5
-rw-r--r--cddl/usr.bin/tests/Makefile10
-rw-r--r--cddl/usr.sbin/Makefile5
-rw-r--r--cddl/usr.sbin/tests/Makefile10
10 files changed, 77 insertions, 2 deletions
diff --git a/cddl/Makefile b/cddl/Makefile
index 801d9cffa015..2a9b6f8089d5 100644
--- a/cddl/Makefile
+++ b/cddl/Makefile
@@ -1,5 +1,11 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
SUBDIR= lib sbin usr.bin usr.sbin
+.if ${MK_TESTS} != "no"
+SUBDIR+=tests
+.endif
+
.include <bsd.subdir.mk>
diff --git a/cddl/lib/Makefile b/cddl/lib/Makefile
index 53d402a7aaa8..fef13839d9ae 100644
--- a/cddl/lib/Makefile
+++ b/cddl/lib/Makefile
@@ -11,7 +11,12 @@ SUBDIR= ${_drti} \
libuutil \
${_libzfs_core} \
${_libzfs} \
- ${_libzpool}
+ ${_libzpool} \
+ ${_tests}
+
+.if ${MK_TESTS} != "no"
+_tests= tests
+.endif
.if ${MK_ZFS} != "no"
_libzfs_core= libzfs_core
diff --git a/cddl/lib/tests/Makefile b/cddl/lib/tests/Makefile
new file mode 100644
index 000000000000..4a49d9fee849
--- /dev/null
+++ b/cddl/lib/tests/Makefile
@@ -0,0 +1,10 @@
+# $FreeBSD$
+
+.include <bsd.own.mk>
+
+TESTSDIR= ${TESTSBASE}/cddl/lib
+
+.PATH: ${.CURDIR:H:H:H}/tests
+KYUAFILE= yes
+
+.include <bsd.test.mk>
diff --git a/cddl/sbin/Makefile b/cddl/sbin/Makefile
index f74307c5fd6a..4fd96f6ee0e5 100644
--- a/cddl/sbin/Makefile
+++ b/cddl/sbin/Makefile
@@ -2,7 +2,11 @@
.include <bsd.own.mk>
-SUBDIR= ${_zfs} ${_zpool}
+SUBDIR= ${_tests} ${_zfs} ${_zpool}
+
+.if ${MK_TESTS} != "no"
+_tests= tests
+.endif
.if ${MK_ZFS} != "no"
_zfs= zfs
diff --git a/cddl/sbin/tests/Makefile b/cddl/sbin/tests/Makefile
new file mode 100644
index 000000000000..91bbaee271f4
--- /dev/null
+++ b/cddl/sbin/tests/Makefile
@@ -0,0 +1,10 @@
+# $FreeBSD$
+
+.include <bsd.own.mk>
+
+TESTSDIR= ${TESTSBASE}/cddl/sbin
+
+.PATH: ${.CURDIR:H:H:H}/tests
+KYUAFILE= yes
+
+.include <bsd.test.mk>
diff --git a/cddl/tests/Makefile b/cddl/tests/Makefile
new file mode 100644
index 000000000000..34a27ea636a0
--- /dev/null
+++ b/cddl/tests/Makefile
@@ -0,0 +1,10 @@
+# $FreeBSD$
+
+.include <bsd.own.mk>
+
+TESTSDIR= ${TESTSBASE}/cddl
+
+.PATH: ${.CURDIR:H:H}/tests
+KYUAFILE= yes
+
+.include <bsd.test.mk>
diff --git a/cddl/usr.bin/Makefile b/cddl/usr.bin/Makefile
index 13d3a86232cb..3547ff7b6994 100644
--- a/cddl/usr.bin/Makefile
+++ b/cddl/usr.bin/Makefile
@@ -7,11 +7,16 @@ SUBDIR= \
ctfdump \
ctfmerge \
sgsmsg \
+ ${_tests} \
${_zinject} \
${_zlook} \
${_zstreamdump} \
${_ztest}
+.if ${MK_TESTS} != "no"
+_tests= tests
+.endif
+
.if ${MK_ZFS} != "no"
_zinject= zinject
#_zlook= zlook
diff --git a/cddl/usr.bin/tests/Makefile b/cddl/usr.bin/tests/Makefile
new file mode 100644
index 000000000000..c94d5910a210
--- /dev/null
+++ b/cddl/usr.bin/tests/Makefile
@@ -0,0 +1,10 @@
+# $FreeBSD$
+
+.include <bsd.own.mk>
+
+TESTSDIR= ${TESTSBASE}/cddl/usr.bin
+
+.PATH: ${.CURDIR:H:H:H}/tests
+KYUAFILE= yes
+
+.include <bsd.test.mk>
diff --git a/cddl/usr.sbin/Makefile b/cddl/usr.sbin/Makefile
index fb2c43738b5c..8551c28a1a0b 100644
--- a/cddl/usr.sbin/Makefile
+++ b/cddl/usr.sbin/Makefile
@@ -5,9 +5,14 @@
SUBDIR= ${_dtrace} \
${_dtruss} \
${_lockstat} \
+ ${_tests} \
${_zdb} \
${_zhack}
+.if ${MK_TESTS} != "no"
+_tests= tests
+.endif
+
.if ${MK_ZFS} != "no"
.if ${MK_LIBTHR} != "no"
_zdb= zdb
diff --git a/cddl/usr.sbin/tests/Makefile b/cddl/usr.sbin/tests/Makefile
new file mode 100644
index 000000000000..0305aeef1d3b
--- /dev/null
+++ b/cddl/usr.sbin/tests/Makefile
@@ -0,0 +1,10 @@
+# $FreeBSD$
+
+.include <bsd.own.mk>
+
+TESTSDIR= ${TESTSBASE}/cddl/usr.sbin
+
+.PATH: ${.CURDIR:H:H:H}/tests
+KYUAFILE= yes
+
+.include <bsd.test.mk>