git: 20191b71bae1 - stable/14 - src.conf: Add a MK_ZFS_TESTS knob

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Fri, 20 Sep 2024 11:40:03 UTC
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=20191b71bae1f86ecc03e67d60ad801a72ea05d2

commit 20191b71bae1f86ecc03e67d60ad801a72ea05d2
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-09-07 14:36:28 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-09-20 11:39:16 +0000

    src.conf: Add a MK_ZFS_TESTS knob
    
    The in-tree ZFS test suite is somewhat outdated and I see a number of
    failures there.  I tend to think that we want to integrate the OpenZFS
    test suite somehow, replacing the legacy one, though it's also possible
    to run that as a separate test suite.
    
    In any case, if one wants to run the OpenZFS test suite separately, it's
    useful to be able to disable installation of the legacy ZFS test suite,
    so let's provide a src.conf option to do that.
    
    Reviewed by:    asomers
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D46476
    
    (cherry picked from commit 24affded3d4ec5fafb6b22f773ec1e20d73b9b03)
---
 share/mk/src.opts.mk                  | 6 ++++++
 tests/sys/cddl/Makefile               | 2 +-
 tools/build/options/WITHOUT_ZFS_TESTS | 1 +
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk
index a12a748a6055..600daa9ef61b 100644
--- a/share/mk/src.opts.mk
+++ b/share/mk/src.opts.mk
@@ -190,6 +190,7 @@ __DEFAULT_YES_OPTIONS = \
     WIRELESS \
     WPA_SUPPLICANT_EAPOL \
     ZFS \
+    ZFS_TESTS \
     LOADER_ZFS \
     ZONEINFO
 
@@ -444,6 +445,11 @@ MK_OFED_EXTRA:=	no
 
 .if ${MK_TESTS} == "no"
 MK_DTRACE_TESTS:= no
+MK_ZFS_TESTS:= no
+.endif
+
+.if ${MK_ZFS} == "no"
+MK_ZFS_TESTS:=	no
 .endif
 
 .if ${MK_TESTS_SUPPORT} == "no"
diff --git a/tests/sys/cddl/Makefile b/tests/sys/cddl/Makefile
index 80c72ea5ec42..377faae73522 100644
--- a/tests/sys/cddl/Makefile
+++ b/tests/sys/cddl/Makefile
@@ -5,7 +5,7 @@ TESTSDIR=	${TESTSBASE}/sys/cddl
 
 TESTS_SUBDIRS+=	${_zfs}
 
-.if ${MK_ZFS} != "no"
+.if ${MK_ZFS_TESTS} != "no"
 _zfs=	zfs
 .endif
 
diff --git a/tools/build/options/WITHOUT_ZFS_TESTS b/tools/build/options/WITHOUT_ZFS_TESTS
new file mode 100644
index 000000000000..ae2ac45ca0f3
--- /dev/null
+++ b/tools/build/options/WITHOUT_ZFS_TESTS
@@ -0,0 +1 @@
+Do not build and install the legacy ZFS test suite.