[opengm] 02/09: d/rules: simplify dh_auto_test override.

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Sat Apr 2 12:26:25 UTC 2016


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

ghisvail-guest pushed a commit to branch debian/master
in repository opengm.

commit 2d4f64da47b36f306ec02e241e77e7428c6960b3
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date:   Fri Apr 1 16:04:54 2016 +0100

    d/rules: simplify dh_auto_test override.
---
 debian/rules | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/debian/rules b/debian/rules
index 69a77f2..93f04af 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,6 +8,10 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 
+# Set the build directory explicitly.
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+BUILDDIR = $(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)
+
 # Build options.
 BUILD_OPTIONS = \
 	-DBUILD_TUTORIALS=OFF \
@@ -27,7 +31,7 @@ else
 endif
 
 %:
-	dh $@ --parallel --with python2 
+	dh $@ --parallel --builddirectory=$(BUILDDIR) --with python2
 
 override_dh_auto_configure-arch:
 	dh_auto_configure -- \
@@ -44,11 +48,9 @@ override_dh_auto_configure-indep:
 override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 	# Run library testsuite.
-	cd obj-* && \
-	CTEST_OUTPUT_ON_FAILURE=1 ctest --force-new-ctest-process
+	CTEST_OUTPUT_ON_FAILURE=1 dh_auto_test
 	# Run Python testsuite.
-	cd obj-* && \
-	make test-python-wrapper
+	make --directory=$(BUILDDIR) test-python-wrapper
 endif
 
 override_dh_installdocs-indep:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opengm.git



More information about the debian-science-commits mailing list