Several regression tests requires installed packages:
sys/netinet6/frag6/Makefile
sys/net/pf_forward/Makefile
sys/net/pf_fragment/Makefile
usr.sbin/relayd/Makefile

It is better to do it automatically from bsd.regress.mk
via setting value PKG_REQUIRED in Makefile for each test.
It makes tests more automated and avoid manual preparation.

Diff for bsd.regress.mk is below:

--- bsd.regress.mk_     Sun Jun 30 15:32:02 2013
+++ bsd.regress.mk      Sun Jun 30 15:35:38 2013
@@ -38,6 +38,7 @@
 REGRESS_SKIP_TARGETS?=
 REGRESS_SKIP_SLOW?=no
 REGRESS_FAIL_EARLY?=no
+PKG_REQUIRED?=
 
 _REGRESS_NAME=${.CURDIR:S/${BSDSRCDIR}\/regress\///}
 _REGRESS_TMP?=/dev/null
@@ -83,7 +84,14 @@
 .  endif
 .endif 
 
-regress: .SILENT
+preparation:
+. if defined(PKG_REQUIRED)
+       @for package in ${PKG_REQUIRED}; do \
+                (set -e; pkg_add $${package}); \
+       done;
+. endif
+
+regress: .SILENT preparation
 .if ! ${REGRESS_LOG:M/*}
        echo =========================================================
        echo REGRESS_LOG must contain an absolute path to the log-file.
@@ -91,7 +99,7 @@
        echo =========================================================
        exit 1
 .endif
-.for RT in ${REGRESS_TARGETS} 
+.for RT in ${REGRESS_TARGETS}
 .  if ${REGRESS_SKIP_TARGETS:M${RT}}
        @echo -n "SKIP " ${_REGRESS_OUT}
 .  else

-- 
sergeyb@

Reply via email to