aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/Uses/perl5.mk
diff options
context:
space:
mode:
Diffstat (limited to 'Mk/Uses/perl5.mk')
-rw-r--r--Mk/Uses/perl5.mk13
1 files changed, 13 insertions, 0 deletions
diff --git a/Mk/Uses/perl5.mk b/Mk/Uses/perl5.mk
index 2814a8703fba..3f624f7d21f0 100644
--- a/Mk/Uses/perl5.mk
+++ b/Mk/Uses/perl5.mk
@@ -259,4 +259,17 @@ do-install:
post-stage::
-@[ -d ${STAGEDIR}${SITE_PERL}/${PERL_ARCH}/auto ] && ${FIND} ${STAGEDIR}${SITE_PERL}/${PERL_ARCH}/auto -name .packlist -exec ${SED} -i '' 's|^${STAGEDIR}||' '{}' \;
.endif
+
+.if !target(regression-test)
+TEST_ARGS+= ${MAKE_ARGS}
+TEST_ENV+= ${MAKE_ENV}
+TEST_TARGET?= test
+TEST_WRKSRC?= ${BUILD_WRKSRC}
+regression-test test: build
+.if ${USE_PERL5:Mmodbuild*}
+ -cd ${TEST_WRKSRC}/ && ${SETENV} ${TEST_ENV} ${PERL5} ${PL_BUILD} ${TEST_TARGET} ${TEST_ARGS}
+.elif ${USE_PERL5:Mconfigure}
+ -cd ${TEST_WRKSRC}/ && ${SETENV} ${TEST_ENV} ${MAKE_CMD} ${TEST_ARGS} ${TEST_TARGET}
+.endif # USE_PERL5:Mmodbuild*
+.endif # regression-test
.endif # defined(_POSTMKINCLUDED)