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

sebastic pushed a commit to branch master
in repository libpdl-netcdf-perl.

commit 2f3b461f1d5e0f4d26609e3b208e7df072149f9a
Author: Bas Couwenberg <sebas...@xs4all.nl>
Date:   Sat Jun 25 01:12:42 2016 +0200

    Add patch to skip tests using threedimstring.nc on big-endian systems.
    
    nc_open fails: NetCDF: Invalid dimension ID or name
---
 debian/changelog                               |  8 +++++
 debian/patches/series                          |  1 +
 debian/patches/skip-tests-for-big-endian.patch | 42 ++++++++++++++++++++++++++
 3 files changed, 51 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index ee34a7f..06f1a4e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+libpdl-netcdf-perl (4.20-4) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * Add patch to skip tests using threedimstring.nc on big-endian systems.
+    nc_open fails: NetCDF: Invalid dimension ID or name
+
+ -- Bas Couwenberg <sebas...@debian.org>  Sat, 25 Jun 2016 01:10:47 +0200
+
 libpdl-netcdf-perl (4.20-3) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/patches/series b/debian/patches/series
index 61ecff3..44e398b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 perl-5.14-ccflags.patch
 spelling-errors.patch
 32bits-integer-size.patch
+skip-tests-for-big-endian.patch
diff --git a/debian/patches/skip-tests-for-big-endian.patch 
b/debian/patches/skip-tests-for-big-endian.patch
new file mode 100644
index 0000000..68131da
--- /dev/null
+++ b/debian/patches/skip-tests-for-big-endian.patch
@@ -0,0 +1,42 @@
+Description: Skip tests using threedimstring.nc on big-endian systems.
+ nc_open fails: NetCDF: Invalid dimension ID or name
+Author: Bas Couwenberg <sebas...@debian.org>
+
+--- a/t/01-Netcdf3.t
++++ b/t/01-Netcdf3.t
+@@ -231,15 +231,23 @@ $obj = PDL::NetCDF->new('foo.nc');
+ $obj->getatt("text_attribute");
+ ok(1, "close is idempotent");
+ 
+-# check reading of string slices
+-$obj = PDL::NetCDF->new("$Bin/threedimstring.nc", {MODE => O_RDONLY,
+-                                                 REVERSE_DIMS => 1,
+-                                                   SLOW_CHAR_FETCH => 1});
+-my $varname = 'threedimstring';
+-my $str1 = $obj->get ($varname, [0, 0, 0], [200, 1, 1]);
+-my $str2 =  $obj->get ($varname, [0, 1, 1], [200, 1, 1]);
+-ok($str1->string ne $str2->string, "slicing different strings");
+-my $strX = $obj->get($varname);
+-my $nsize = 1;
+-map {$nsize *= $_ } $strX->dims;
+-ok($nsize == 200*5*4, "reading 3dim strings complete");
++# Skip tests on big-endian architectures.
++# nc_open fails reporting: NetCDF: Invalid dimension ID or name
++SKIP: {
++  my $is_big_endian = unpack("h*", pack("s", 1)) =~ /01/;
++
++  skip "nc_open on threedimstring.nc fails on big-endian architectures", 2 
if($is_big_endian);
++
++  # check reading of string slices
++  $obj = PDL::NetCDF->new("$Bin/threedimstring.nc", {MODE => O_RDONLY,
++                                                     REVERSE_DIMS => 1,
++                                                     SLOW_CHAR_FETCH => 1});
++  my $varname = 'threedimstring';
++  my $str1 = $obj->get ($varname, [0, 0, 0], [200, 1, 1]);
++  my $str2 =  $obj->get ($varname, [0, 1, 1], [200, 1, 1]);
++  ok($str1->string ne $str2->string, "slicing different strings");
++  my $strX = $obj->get($varname);
++  my $nsize = 1;
++  map {$nsize *= $_ } $strX->dims;
++  ok($nsize == 200*5*4, "reading 3dim strings complete");
++}

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libpdl-netcdf-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to