[Git][debian-gis-team/postgis][master] Don't hardcode test exit status for failures.

Bas Couwenberg gitlab at salsa.debian.org
Thu Jan 16 09:17:38 GMT 2020



Bas Couwenberg pushed to branch master at Debian GIS Project / postgis


Commits:
cdca82b7 by Bas Couwenberg at 2020-01-16T10:17:25+01:00
Don't hardcode test exit status for failures.

Don't bother with autopkgtest on problematic architectures. (closes: #949026)

- - - - -


3 changed files:

- debian/changelog
- debian/rules
- debian/tests/regress


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+postgis (3.0.0+dfsg-7) UNRELEASED; urgency=medium
+
+  * Don't hardcode test exit status for failures.
+  * Don't bother with autopkgtest on problematic architectures.
+    (closes: #949026)
+
+ -- Bas Couwenberg <sebastic at debian.org>  Thu, 16 Jan 2020 10:16:23 +0100
+
 postgis (3.0.0+dfsg-6) unstable; urgency=medium
 
   * Revert postgresql-11 change in control file.


=====================================
debian/rules
=====================================
@@ -42,12 +42,6 @@ debian/control: debian/control.in debian/pgversions
 	done; \
 	mv $@.pgxs_tmp $@) || (rm -f $@.pgxs_tmp; exit 1)
 
-CHECK_FAIL = exit 2
-# Ignore test failure on problematic architectures
-ifneq (,$(filter $(DEB_BUILD_ARCH),mips mips64el mipsel s390x alpha hppa hurd-i386 kfreebsd-i386 powerpc ppc64 sparc64))
-	CHECK_FAIL = exit 0
-endif
-
 # Upstream version (including ~rcN) for symbols version
 UPSTREAM_VERSION := $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//')
 
@@ -183,16 +177,31 @@ override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 #   Run unit tests (against the newest Postgres version, first)
 	echo " ### testing $(NEWEST_POSTGRES_VERSION) ###"
+# Ignore test failure on problematic architectures
+ifneq (,$(filter $(DEB_BUILD_ARCH),mips mips64el mipsel s390x alpha hppa hurd-i386 kfreebsd-i386 powerpc ppc64 sparc64))
 	pg_virtualenv -v $(NEWEST_POSTGRES_VERSION) \
-		make check RUNTESTFLAGS="-v" || $(CHECK_FAIL)
+		make check RUNTESTFLAGS="-v" || echo "Ignoring test failures"
+else
+	pg_virtualenv -v $(NEWEST_POSTGRES_VERSION) \
+		make check RUNTESTFLAGS="-v"
+endif
 
 #	Test against all other Postgres versions
+ifneq (,$(filter $(DEB_BUILD_ARCH),mips mips64el mipsel s390x alpha hppa hurd-i386 kfreebsd-i386 powerpc ppc64 sparc64))
 	set -e; \
 	for PGVER in $(OTHER_POSTGRES_VERSIONS); do \
 		echo " ### testing $$PGVER ###"; \
 		pg_virtualenv -v $$PGVER \
-			make -C $(CURDIR)/debian/build-$$PGVER check RUNTESTFLAGS="-v" || $(CHECK_FAIL); \
+			make -C $(CURDIR)/debian/build-$$PGVER check RUNTESTFLAGS="-v" || echo "Ignoring test failures"; \
 	done
+else
+	set -e; \
+	for PGVER in $(OTHER_POSTGRES_VERSIONS); do \
+		echo " ### testing $$PGVER ###"; \
+		pg_virtualenv -v $$PGVER \
+			make -C $(CURDIR)/debian/build-$$PGVER check RUNTESTFLAGS="-v"; \
+	done
+endif
 endif
 
 override_dh_auto_install:


=====================================
debian/tests/regress
=====================================
@@ -18,6 +18,14 @@ fi
 # Makefile.in needs some variables from ./configure, set the most important ones here
 POSTGIS_GEOS_VERSION="$(dpkg-query -f '${Version}' --show 'libgeos-*.*' | cut -c 1,3)"
 
+# Skip tests on problematic architectures
+ARCH="$(dpkg-architecture -qDEB_BUILD_ARCH)"
+
+if [ "${ARCH}" = "mips" ] || [ "${ARCH}" = "mips64el" ] || [ "${ARCH}" = "mipsel" ] || [ "${ARCH}" = "s390x" ] || [ "${ARCH}" = "alpha" ] || [ "${ARCH}" = "hppa" ] || [ "${ARCH}" = "hurd-i386" ] || [ "${ARCH}" = "kfreebsd-i386" ] || [ "${ARCH}" = "powerpc" ] || [ "${ARCH}" = "ppc64" ] || [ "${ARCH}" = "sparc64" ]; then
+  echo "Skipping tests on problematic architectures"
+  exit 77
+fi
+
 # clean up on exit
 trap "rm -rf /tmp/pgis_reg" EXIT
 



View it on GitLab: https://salsa.debian.org/debian-gis-team/postgis/commit/cdca82b798fe5db9ff56226cdbf5d07c0721609e

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/postgis/commit/cdca82b798fe5db9ff56226cdbf5d07c0721609e
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/20200116/3abe1f2e/attachment-0001.html>


More information about the Pkg-grass-devel mailing list