Create TEST_ENV variable that's initially just MAKE_ENV, but can be added

to by a package Makefile.  This is passed as the environment when running
the test target.  We often need this since packages can require setting
up LD_LIBRARY_PATH so that we can test before installation.
This commit is contained in:
jlam 2003-09-10 02:20:50 +00:00
parent 0f8e732621
commit 059f36a8ff

View file

@ -1,4 +1,4 @@
# $NetBSD: bsd.pkg.mk,v 1.1267 2003/09/09 13:36:36 jlam Exp $
# $NetBSD: bsd.pkg.mk,v 1.1268 2003/09/10 02:20:50 jlam Exp $
#
# This file is in the public domain.
#
@ -2361,13 +2361,14 @@ do-build:
#Test
TEST_DIRS?= ${BUILD_DIRS}
TEST_ENV+= ${MAKE_ENV}
.PHONY: do-test
.if !target(do-test)
do-test:
. if defined(TEST_TARGET)
. for DIR in ${TEST_DIRS}
${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD}cd ${DIR} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} -f ${MAKEFILE} ${TEST_TARGET}
${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD}cd ${DIR} && ${SETENV} ${TEST_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} -f ${MAKEFILE} ${TEST_TARGET}
. endfor
. else
@${DO_NADA}