r33151 - /trunk/dh-make-perl/lib/DhMakePerl.pm
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Mon Apr 13 20:48:54 UTC 2009
Author: dmn
Date: Mon Apr 13 20:48:44 2009
New Revision: 33151
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=33151
Log:
ignore --notest
instead, provide DH<7 debian/rules that obeys nocheck in
DEB_BUILD_OPTIONS. DH7 supports that too.
Modified:
trunk/dh-make-perl/lib/DhMakePerl.pm
Modified: trunk/dh-make-perl/lib/DhMakePerl.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl.pm?rev=33151&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl.pm Mon Apr 13 20:48:44 2009
@@ -1143,12 +1143,17 @@
$fh->seek( 0, 0 ) || die "Can't rewind $rules_file: $!";
$fh->truncate(0) || die "Can't truncate $rules_file: $!";
+ warn "--notest ignored. if you don't want to run the tests when building the package, add 'nocheck' to DEB_BUILD_OPTIONS\n"
+ if $self->cfg->notest;
+
if ( $self->cfg->dh < 7 ) {
$test_line
= ( $module_build eq 'Module-Build' )
? '$(PERL) Build test'
: '$(MAKE) test';
- $test_line = "#$test_line" if $self->cfg->notest;
+ $test_line = "+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))\n"
+ . "\t$test_line\n"
+ . "endif";
for (@content) {
s/#CHANGES#/$changelog_file/g;
@@ -1161,12 +1166,7 @@
}
}
else {
- for (@content) {
- if ($self->cfg->notest) {
- s/dh build/dh build --before dh_auto_test\n\tdh build --after dh_auto_test/;
- }
- $fh->print($_)
- }
+ $fh->print($_) for @content;
if (@examples) {
open F, '>>', "$maindir/debian/$pkgname.examples" or die $!;
print F "$_\n" foreach @examples;
More information about the Pkg-perl-cvs-commits
mailing list