Expose _TESTS_USE_OBJDIR as MK_MAKE_CHECK_USE_SANDBOX and anchor the default
value on MK_TESTS. Use bsd.opts.mk in suite.test.mk to toggle the behavior.
This commit is contained in:
parent
7f42d6ccf3
commit
0184d338a7
@ -443,7 +443,7 @@ OBJS_DEPEND_GUESS.${_S:R}.pico+= ${_S}
|
||||
.endif
|
||||
|
||||
.if defined(HAS_TESTS)
|
||||
MAKE+= -D_TESTS_USE_OBJDIR
|
||||
MAKE+= MK_MAKE_CHECK_USE_SANDBOX=yes
|
||||
SUBDIR_TARGETS+= check
|
||||
TESTS_LD_LIBRARY_PATH+= ${.OBJDIR}
|
||||
.endif
|
||||
|
@ -55,6 +55,7 @@ __DEFAULT_YES_OPTIONS = \
|
||||
INCLUDES \
|
||||
INSTALLLIB \
|
||||
KERBEROS \
|
||||
MAKE_CHECK_USE_SANDBOX \
|
||||
MAN \
|
||||
MANCOMPRESS \
|
||||
NIS \
|
||||
@ -75,6 +76,7 @@ __DEFAULT_NO_OPTIONS = \
|
||||
|
||||
# meta mode related
|
||||
__DEFAULT_DEPENDENT_OPTIONS = \
|
||||
MAKE_CHECK_USE_SANDBOX/TESTS
|
||||
STAGING_MAN/STAGING \
|
||||
STAGING_PROG/STAGING \
|
||||
STALE_STAGED/STAGING \
|
||||
|
@ -306,7 +306,7 @@ lint: ${SRCS:M*.c}
|
||||
.endif
|
||||
|
||||
.if defined(HAS_TESTS)
|
||||
MAKE+= -D_TESTS_USE_OBJDIR
|
||||
MAKE+= MK_MAKE_CHECK_USE_SANDBOX=yes
|
||||
SUBDIR_TARGETS+= check
|
||||
TESTS_LD_LIBRARY_PATH+= ${.OBJDIR}
|
||||
TESTS_PATH+= ${.OBJDIR}
|
||||
|
@ -8,6 +8,8 @@
|
||||
.error suite.test.mk cannot be included directly.
|
||||
.endif
|
||||
|
||||
.include <bsd.opts.mk>
|
||||
|
||||
# Name of the test suite these tests belong to. Should rarely be changed for
|
||||
# Makefiles built into the FreeBSD src tree.
|
||||
TESTSUITE?= FreeBSD
|
||||
@ -101,7 +103,7 @@ realcheck: .PHONY
|
||||
fi
|
||||
@env ${TESTS_ENV:Q} ${KYUA} test -k ${CHECKDIR}/Kyuafile
|
||||
|
||||
.if defined(_TESTS_USE_OBJDIR) && make(check)
|
||||
.if ${MK_MAKE_CHECK_USE_SANDBOX} && make(check)
|
||||
DESTDIR:= ${.OBJDIR}/checkdir
|
||||
CLEANDIRS+= ${DESTDIR}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user