summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint/Makefile
diff options
context:
space:
mode:
authorschmonz <schmonz>2013-01-19 22:51:11 +0000
committerschmonz <schmonz>2013-01-19 22:51:11 +0000
commitfdf1f21264e31eac2b55551fc4def960c0f65d0b (patch)
treebd1a8f6142140f8e67285fd8bf07c1f101c22414 /pkgtools/pkglint/Makefile
parentb020d82020c4eb9d9947a2e24b2d0577bb66764e (diff)
downloadpkgsrc-fdf1f21264e31eac2b55551fc4def960c0f65d0b.tar.gz
Make it possible to easily write automated tests:
* minimally adapt pkglint(1) into a "modulino" for testability * verify it still runs normally as a program * create a test script with a few very simple test cases * hook it up to 'make test' * verify that the tests really fail if I go breaking the code under test Meta-addresses PR pkg/46570. New BUILD_DEPENDS, but no functional change, so no PKGREVISION bump. Approved by wiz@.
Diffstat (limited to 'pkgtools/pkglint/Makefile')
-rw-r--r--pkgtools/pkglint/Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile
index ab2320adc43..a38dd5a0eb4 100644
--- a/pkgtools/pkglint/Makefile
+++ b/pkgtools/pkglint/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.423 2012/12/11 14:57:59 ryoon Exp $
+# $NetBSD: Makefile,v 1.424 2013/01/19 22:51:11 schmonz Exp $
# Note: if you update the version number, please have a look at the
# changes between the CVS tag "pkglint_current" and HEAD.
@@ -16,6 +16,8 @@ DEPENDS+= p5-Digest-SHA1-[0-9]*:../../security/p5-Digest-SHA1
DEPENDS+= p5-enum>=1.016:../../devel/p5-enum
DEPENDS+= p5-pkgsrc-Dewey>=1.0:../../pkgtools/p5-pkgsrc-Dewey
+BUILD_DEPENDS+= p5-Test-Trap-[0-9]*:../../devel/p5-Test-Trap
+
PKG_INSTALLATION_TYPES= overwrite pkgviews
WRKSRC= ${WRKDIR}
@@ -28,7 +30,7 @@ AUTO_MKDIRS= yes
SUBST_CLASSES+= pkglint
SUBST_STAGE.pkglint= post-configure
-SUBST_FILES.pkglint+= pkglint.pl
+SUBST_FILES.pkglint+= pkglint.pl pkglint.t
SUBST_FILES.pkglint+= plist-clash.pl
.if defined(BATCH)
SUBST_SED.pkglint+= -e s\|@PKGSRCDIR@\|/usr/pkgsrc\|g
@@ -50,7 +52,10 @@ quick-install:
${MAKE} do-extract subst-pkglint do-install selftest clean
do-extract:
- cd ${FILESDIR} && ${CP} pkglint.0 pkglint.1 pkglint.pl plist-clash.pl ${WRKSRC}
+ cd ${FILESDIR} && ${CP} pkglint.0 pkglint.1 pkglint.pl pkglint.t plist-clash.pl ${WRKSRC}
+
+do-test:
+ cd ${WRKSRC} && prove pkglint.t
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/pkglint.pl ${DESTDIR}${PREFIX}/bin/pkglint