[libmodule-build-perl] 01/02: Slightly patch the test suite for autopkgtest support.
Niko Tyni
ntyni at moszumanska.debian.org
Fri Sep 19 09:18:01 UTC 2014
This is an automated email from the git hooks/post-receive script.
ntyni pushed a commit to branch master
in repository libmodule-build-perl.
commit 6a38a9505741bceb8a06f79671213d968cd56e31
Author: Niko Tyni <ntyni at debian.org>
Date: Fri Sep 19 00:04:46 2014 +0300
Slightly patch the test suite for autopkgtest support.
---
...ng-from-system-path-when-running-under-au.patch | 44 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 45 insertions(+)
diff --git a/debian/patches/0001-Allow-loading-from-system-path-when-running-under-au.patch b/debian/patches/0001-Allow-loading-from-system-path-when-running-under-au.patch
new file mode 100644
index 0000000..470a119
--- /dev/null
+++ b/debian/patches/0001-Allow-loading-from-system-path-when-running-under-au.patch
@@ -0,0 +1,44 @@
+From 5a72ba915915cc44d7651f185fc2f0a3e7acfecd Mon Sep 17 00:00:00 2001
+From: Niko Tyni <ntyni at debian.org>
+Date: Fri, 19 Sep 2014 00:00:51 +0300
+Subject: [PATCH] Allow loading from system path when running under autopkgtest
+
+When re-using the build time test suite as a runtime as-installed one,
+we explicitly want to load Module::Build from the system paths. This
+situation is detected by the ADTTMP environment variable, set by the
+autopkgtest tool. See http://dep.debian.net/deps/dep8/
+
+Rewiring check_compiler() to return early is to avoid a call
+to M::B->current(), which needs a 'build_params' file remaining
+from its own build.
+
+Forwarded: not-needed
+---
+ t/lib/MBTest.pm | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/t/lib/MBTest.pm b/t/lib/MBTest.pm
+index fda7f69..86c6d1f 100644
+--- a/t/lib/MBTest.pm
++++ b/t/lib/MBTest.pm
+@@ -220,7 +220,7 @@ sub find_in_path {
+ }
+
+ sub check_compiler {
+- if ($ENV{PERL_CORE}) {
++ if ($ENV{PERL_CORE} || $ENV{ADTTMP}) {
+ require IPC::Cmd;
+ if ( $Config{usecrosscompile} && !IPC::Cmd::can_run($Config{cc}) ) {
+ return;
+@@ -271,7 +271,7 @@ sub blib_load {
+ (my $path = $mod) =~ s{::}{/}g;
+ $path .= ".pm";
+ my ($pkg, $file, $line) = caller;
+- unless($ENV{PERL_CORE}) {
++ unless($ENV{PERL_CORE} || $ENV{ADTTMP}) {
+ unless($INC{$path} =~ m/\bblib\b/) {
+ (my $load_from = $INC{$path}) =~ s{$path$}{};
+ die "$mod loaded from '$load_from'\nIt should have been loaded from blib. \@INC contains:\n ",
+--
+2.1.0
+
diff --git a/debian/patches/series b/debian/patches/series
index 413cab2..4218d4a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
man-ext
+0001-Allow-loading-from-system-path-when-running-under-au.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmodule-build-perl.git
More information about the Pkg-perl-cvs-commits
mailing list