[libconfig-model-itself-perl] 04/05: Fix autopkgtest.

gregor herrmann gregoa at debian.org
Fri Jun 5 13:03:47 UTC 2015


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libconfig-model-itself-perl.

commit d37cd30068391ebd294b593c70818a469d6dafac
Author: gregor herrmann <gregoa at debian.org>
Date:   Fri Jun 5 15:00:55 2015 +0200

    Fix autopkgtest.
    
    Add debian/tests/pkg-perl/test-files and debian/patches/autopkgtest.patch.
---
 debian/patches/autopkgtest.patch | 42 ++++++++++++++++++++++++++++++++++++++++
 debian/patches/series            |  1 +
 debian/tests/pkg-perl/test-files |  2 ++
 3 files changed, 45 insertions(+)

diff --git a/debian/patches/autopkgtest.patch b/debian/patches/autopkgtest.patch
new file mode 100644
index 0000000..0218d45
--- /dev/null
+++ b/debian/patches/autopkgtest.patch
@@ -0,0 +1,42 @@
+Description: adjust paths when run under autopkgtest
+Origin: vendor
+Forwarded: not-needed
+Author: gregor herrmann <gregoa at debian.org>
+Last-Update: 2015-06-05
+
+--- a/t/dot_graph.t
++++ b/t/dot_graph.t
+@@ -38,7 +38,8 @@
+ 
+ my $meta_root = $meta_inst -> config_root ;
+ 
+-my $model_dir = 'lib/Config/Model/models' ;
++my $dir = $ENV{ADTTMP} ? '/usr/share/perl5' : 'lib';
++my $model_dir = "$dir/Config/Model/models" ;
+ my $rw_obj = Config::Model::Itself -> new(
+     model_object => $meta_root,
+     model_dir => $model_dir,
+--- a/t/list_itself_structure.t
++++ b/t/list_itself_structure.t
+@@ -36,7 +36,8 @@
+ 
+ my $meta_root = $meta_inst -> config_root ;
+ 
+-my $model_dir = 'lib/Config/Model/models';
++my $dir = $ENV{ADTTMP} ? '/usr/share/perl5' : 'lib';
++my $model_dir = "$dir/Config/Model/models";
+ my $rw_obj    = Config::Model::Itself->new(
+     model_dir    => $model_dir,
+     model_object => $meta_root
+--- a/t/load_write_itself.t
++++ b/t/load_write_itself.t
+@@ -49,7 +49,8 @@
+ my $root = $inst -> config_root ;
+ 
+ # copy itself model
+-my $model_dir = 'lib/Config/Model/models';
++my $dir = $ENV{ADTTMP} ? '/usr/share/perl5' : 'lib';
++my $model_dir = "$dir/Config/Model/models";
+ $wanted = sub { 
+     -d $File::Find::name && mkpath( ["$wr_test/$_"], 0, 0755) ;
+     -f $File::Find::name && copy($File::Find::name,"$wr_test/$_") ;
diff --git a/debian/patches/series b/debian/patches/series
index 413bfe5..b748379 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 remove-call-to-env
+autopkgtest.patch
diff --git a/debian/tests/pkg-perl/test-files b/debian/tests/pkg-perl/test-files
new file mode 100644
index 0000000..5e3c053
--- /dev/null
+++ b/debian/tests/pkg-perl/test-files
@@ -0,0 +1,2 @@
+t/
+data/

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libconfig-model-itself-perl.git



More information about the Pkg-perl-cvs-commits mailing list