git: df6131e2b74d - main - Remove CDDL and ctfconvert tests when their controlling knobs are disabled
Date: Tue, 22 Sep 2026 02:53:33 UTC
The branch main has been updated by ngie:
URL: https://cgit.FreeBSD.org/src/commit/?id=df6131e2b74d9f334c16387e9a46cafd6e27eb78
commit df6131e2b74d9f334c16387e9a46cafd6e27eb78
Author: Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-09-22 02:46:52 +0000
Commit: Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-09-22 02:53:03 +0000
Remove CDDL and ctfconvert tests when their controlling knobs are disabled
In the event someone specified MK_CDDL == no prior to this change, all
tests under `/usr/tests/cddl` would stick around after the change,
resulting in errors. Similarly, MK_DTRACE == no removed ctfconvert,
which the ctfconvert tests relied on (but remained around after the knob
was disabled).
Remove the tests under the respective blocks now so they don't linger
around on systems where these knobs are disabled, resulting in false
positives when running the complete test suite.
The ctfconvert tests weren't specifically put under
`${MK_DTRACE_TESTS}` == no because ctfconvert was bundled separately
from the upstream provided Dtrace test suite.
MFC after: 2 weeks
MFC with: 30c20ca26 ("Remove Dtrace/ZFS tests if their knobs are disabled")
---
tools/build/mk/OptionalObsoleteFiles.inc | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index 0511a27a6407..bb98b3a73616 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -1436,6 +1436,18 @@ OLD_FILES+=usr/share/man/man1/llvm-pdbutil.1.gz
OLD_FILES+=usr/share/man/man1/opt.1.gz
.endif
+.if ${MK_CDDL} == no
+CDDL_TEST_DIRS= cddl
+. for d in ${CDDL_TEST_DIRS}
+. if exists(${DESTDIR}${TESTSBASE}/${d}/)
+TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_DIRS+=${TESTS_DIRS}
+TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_FILES+=${TESTS_FILES}
+. endif
+. endfor
+.endif
+
.if ${MK_CLANG_EXTRAS} == no && ${MK_CLANG_FORMAT} == no
OLD_FILES+=usr/bin/clang-format
.endif
@@ -1670,6 +1682,16 @@ OLD_DIRS+=usr/lib${libcompat}/dtrace
OLD_DIRS+=usr/libexec/dwatch
OLD_DIRS+=usr/share/dtrace/toolkit
OLD_DIRS+=usr/share/dtrace
+
+CTFCONVERT_TEST_DIRS= cddl/usr.bin/ctfconvert
+. for d in ${CTFCONVERT_TEST_DIRS}
+. if exists(${DESTDIR}${TESTSBASE}/${d}/)
+TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_DIRS+=${TESTS_DIRS}
+TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_FILES+=${TESTS_FILES}
+. endif
+. endfor
.endif
.if ${MK_DTRACE_TESTS} == no