[Git][debian-gis-team/proj-rdnap][master] 3 commits: Enable verbose test output.
Bas Couwenberg
gitlab at salsa.debian.org
Sat Jun 2 09:25:48 BST 2018
Bas Couwenberg pushed to branch master at Debian GIS Project / proj-rdnap
Commits:
ed229d2c by Bas Couwenberg at 2018-06-02T10:17:59+02:00
Enable verbose test output.
- - - - -
16a823aa by Bas Couwenberg at 2018-06-02T10:22:42+02:00
Ignore difference margin for Test 10 (edge_rd).
Fixes test failure with PROJ 5.1.0.
- - - - -
798d5a08 by Bas Couwenberg at 2018-06-02T10:22:42+02:00
Set distribution to unstable.
- - - - -
4 changed files:
- debian/changelog
- debian/patches/add-test.patch
- debian/rules
- debian/tests/control
Changes:
=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,14 @@
-proj-rdnap (2008-8) UNRELEASED; urgency=medium
+proj-rdnap (2008-8) unstable; urgency=medium
* Rename PROJ.4 to PROJ.
* Update Vcs-* URLs for Salsa.
* Bump Standards-Version to 4.1.4, no changes.
* Strip trailing whitespace from control & rules files.
+ * Enable verbose test output.
+ * Ignore difference margin for Test 10 (edge_rd).
+ Fixes test failure with PROJ 5.1.0.
- -- Bas Couwenberg <sebastic at debian.org> Wed, 21 Feb 2018 14:50:40 +0100
+ -- Bas Couwenberg <sebastic at debian.org> Sat, 02 Jun 2018 10:18:05 +0200
proj-rdnap (2008-7) unstable; urgency=medium
=====================================
debian/patches/add-test.patch
=====================================
--- a/debian/patches/add-test.patch
+++ b/debian/patches/add-test.patch
@@ -62,7 +62,7 @@ Author: Bas Couwenberg <sebastic at debian.org>
+<rd> +proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +nadgrids=rdtrans2008.gsb +units=m +no_defs <>
--- /dev/null
+++ b/testrdtrans2008.json
-@@ -0,0 +1,178 @@
+@@ -0,0 +1,179 @@
+[
+ {
+ "number" : "01",
@@ -237,13 +237,14 @@ Author: Bas Couwenberg <sebastic at debian.org>
+ "height" : "^-?(\\d+\\.\\d+|inf)$",
+ "x" : "*",
+ "y" : "*",
-+ "nap" : "^-?(\\d+\\.\\d+|inf)$"
++ "nap" : "^-?(\\d+\\.\\d+|inf)$",
++ "margin" : "ignore"
+ }
+ }
+]
--- /dev/null
+++ b/testrdtrans2008.pl
-@@ -0,0 +1,323 @@
+@@ -0,0 +1,383 @@
+#!/usr/bin/perl -w
+#
+# Script to do some testing of various transformations
@@ -393,6 +394,9 @@ Author: Bas Couwenberg <sebastic at debian.org>
+ my @out_parts = split /[\t ]/, $out;
+ my @expect_parts = split /[\t ]/, $expect;
+
++ my $output_override = 0;
++ my $margin_override = 0;
++
+ if($direction->{dst} eq 'etrs89') {
+ if($out_parts[0] =~ /^\d+\.\d+$/) {
+ my $diff = 0;
@@ -407,12 +411,21 @@ Author: Bas Couwenberg <sebastic at debian.org>
+
+ if($diff > $max) {
+ print "Latitude exceeds $max degrees: $diff\n" if($cfg{verbose});
-+ $ok = 0;
++ if($test->{override} && $test->{override}->{margin} && $test->{override}->{margin} eq 'ignore') {
++ $margin_override = 1;
++ }
++ else {
++ $ok = 0;
++ }
+ }
+ }
-+ elsif($test->{override} && $test->{override}->{latitude} && $out_parts[0] ne $test->{override}->{latitude}) {
-+ print "Latitude not expected: $out_parts[0], expected: $test->{override}->{latitude}\n" if($cfg{verbose});
-+ $ok = 0;
++ elsif($test->{override} && $test->{override}->{latitude}) {
++ if($out_parts[0] ne $test->{override}->{latitude}) {
++ print "Latitude not expected: $out_parts[0], expected: $test->{override}->{latitude}\n" if($cfg{verbose});
++ $ok = 0;
++ }
++
++ $output_override = 1;
+ }
+
+ if($out_parts[1] =~ /^\d+\.\d+$/) {
@@ -428,12 +441,21 @@ Author: Bas Couwenberg <sebastic at debian.org>
+
+ if($diff > $max) {
+ print "Longitude exceeds $max degrees: $diff\n" if($cfg{verbose});
-+ $ok = 0;
++ if($test->{override} && $test->{override}->{margin} && $test->{override}->{margin} eq 'ignore') {
++ $margin_override = 1;
++ }
++ else {
++ $ok = 0;
++ }
+ }
+ }
-+ elsif($test->{override} && $test->{override}->{longitude} && $out_parts[1] ne $test->{override}->{longitude}) {
-+ print "Longitude not expected: $out_parts[1], expected: $test->{override}->{longitude}\n" if($cfg{verbose});
-+ $ok = 0;
++ elsif($test->{override} && $test->{override}->{longitude}) {
++ if($out_parts[1] ne $test->{override}->{longitude}) {
++ print "Longitude not expected: $out_parts[1], expected: $test->{override}->{longitude}\n" if($cfg{verbose});
++ $ok = 0;
++ }
++
++ $output_override = 1;
+ }
+
+ if($out_parts[2] && $out_parts[2] =~ /^\d+\.\d+$/ &&
@@ -451,12 +473,21 @@ Author: Bas Couwenberg <sebastic at debian.org>
+
+ if($diff > $max) {
+ print "Height exceeds $max meters: $diff\n" if($cfg{verbose});
-+ $ok = 0;
++ if($test->{override} && $test->{override}->{margin} && $test->{override}->{margin} eq 'ignore') {
++ $margin_override = 1;
++ }
++ else {
++ $ok = 0;
++ }
+ }
+ }
-+ elsif($test->{override} && $test->{override}->{height} && $out_parts[2] !~ /$test->{override}->{height}/) {
-+ print "Height not expected: $out_parts[2], expected: $test->{override}->{height}\n" if($cfg{verbose});
-+ $ok = 0;
++ elsif($test->{override} && $test->{override}->{height}) {
++ if($out_parts[2] !~ /$test->{override}->{height}/) {
++ print "Height not expected: $out_parts[2], expected: $test->{override}->{height}\n" if($cfg{verbose});
++ $ok = 0;
++ }
++
++ $output_override = 1;
+ }
+ }
+ elsif($direction->{dst} eq 'rdnap') {
@@ -473,12 +504,21 @@ Author: Bas Couwenberg <sebastic at debian.org>
+
+ if($diff > $max) {
+ print "x coordinate exceeds $max meters: $diff\n" if($cfg{verbose});
-+ $ok = 0;
++ if($test->{override} && $test->{override}->{margin} && $test->{override}->{margin} eq 'ignore') {
++ $margin_override = 1;
++ }
++ else {
++ $ok = 0;
++ }
+ }
+ }
-+ elsif($test->{override} && $test->{override}->{x} && $out_parts[0] ne $test->{override}->{x}) {
-+ print "x coordinate not expected: $out_parts[0], expected: $test->{override}->{x}\n" if($cfg{verbose});
-+ $ok = 0;
++ elsif($test->{override} && $test->{override}->{x}) {
++ if($out_parts[0] ne $test->{override}->{x}) {
++ print "x coordinate not expected: $out_parts[0], expected: $test->{override}->{x}\n" if($cfg{verbose});
++ $ok = 0;
++ }
++
++ $output_override = 1;
+ }
+
+ if($out_parts[1] =~ /^\d+\.\d+$/) {
@@ -494,12 +534,21 @@ Author: Bas Couwenberg <sebastic at debian.org>
+
+ if($diff > $max) {
+ print "y coordinate exceeds $max meters: $diff\n" if($cfg{verbose});
-+ $ok = 0;
++ if($test->{override} && $test->{override}->{margin} && $test->{override}->{margin} eq 'ignore') {
++ $margin_override = 1;
++ }
++ else {
++ $ok = 0;
++ }
+ }
+ }
-+ elsif($test->{override} && $test->{override}->{y} && $out_parts[1] ne $test->{override}->{y}) {
-+ print "y coordinate not expected: $out_parts[1], expected: $test->{override}->{y}\n" if($cfg{verbose});
-+ $ok = 0;
++ elsif($test->{override} && $test->{override}->{y}) {
++ if($out_parts[1] ne $test->{override}->{y}) {
++ print "y coordinate not expected: $out_parts[1], expected: $test->{override}->{y}\n" if($cfg{verbose});
++ $ok = 0;
++ }
++
++ $output_override = 1;
+ }
+
+ if($out_parts[2] && $out_parts[2] =~ /^\d+\.\d+$/ &&
@@ -517,18 +566,30 @@ Author: Bas Couwenberg <sebastic at debian.org>
+
+ if($diff > $max) {
+ print "NAP exceeds $max meters: $diff\n" if($cfg{verbose});
-+ $ok = 0;
++ if($test->{override} && $test->{override}->{margin} && $test->{override}->{margin} eq 'ignore') {
++ $margin_override = 1;
++ }
++ else {
++ $ok = 0;
++ }
+ }
+ }
-+ elsif($test->{override} && $test->{override}->{nap} && $out_parts[2] !~ /$test->{override}->{nap}/) {
-+ print "NAP not expected: $out_parts[2], expected: $test->{override}->{nap}\n" if($cfg{verbose});
-+ $ok = 0;
++ elsif($test->{override} && $test->{override}->{nap}) {
++ if($out_parts[2] !~ /$test->{override}->{nap}/) {
++ print "NAP not expected: $out_parts[2], expected: $test->{override}->{nap}\n" if($cfg{verbose});
++ $ok = 0;
++ }
++
++ $output_override = 1;
+ }
+ }
+
+ $msg = "Not identical, but within margin" if($ok);
+
-+ if($test->{override}) {
++ if($margin_override) {
++ $msg = "Not identical, but margin ignored";
++ }
++ elsif($output_override) {
+ $msg = "Expected output overriden";
+
+ if($direction->{dst} eq 'etrs89' &&
=====================================
debian/rules
=====================================
--- a/debian/rules
+++ b/debian/rules
@@ -7,7 +7,7 @@
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
- PROJ_LIB=. perl ./testrdtrans2008.pl
+ PROJ_LIB=. perl ./testrdtrans2008.pl -v
endif
get-orig-source:
=====================================
debian/tests/control
=====================================
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,2 @@
-Test-Command: perl ./testrdtrans2008.pl
+Test-Command: perl ./testrdtrans2008.pl -v
Depends: @, @builddeps@
View it on GitLab: https://salsa.debian.org/debian-gis-team/proj-rdnap/compare/e9d773be0255aa8621ed74b6228f7cff1e559e83...798d5a08dedd323f1e670dfec30ca7ff763d49c3
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/proj-rdnap/compare/e9d773be0255aa8621ed74b6228f7cff1e559e83...798d5a08dedd323f1e670dfec30ca7ff763d49c3
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20180602/86303840/attachment-0001.html>
More information about the Pkg-grass-devel
mailing list