From 73e1cc131a2052063c977e292a114028b9235e70 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Sun, 31 Jan 2010 00:44:13 +0000 Subject: Honour DEB_BUILD_OPTIONS=nocheck. --- debian/changelog | 1 + debian/rules | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c9af17d59..3b98f820f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ openssh (1:5.3p1-2) UNRELEASED; urgency=low * Link with -Wl,--as-needed (closes: #560155). * Install upstream sshd_config as an example (closes: #415008). * Use dh_lintian. + * Honour DEB_BUILD_OPTIONS=nocheck. -- Colin Watson Sun, 31 Jan 2010 00:11:43 +0000 diff --git a/debian/rules b/debian/rules index 5a4e4cc59..9e1350568 100755 --- a/debian/rules +++ b/debian/rules @@ -14,6 +14,12 @@ else OPTFLAGS := -O0 endif +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) + RUN_TESTS := yes +else + RUN_TESTS := +endif + DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) @@ -23,6 +29,7 @@ ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) else confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) CC := $(DEB_HOST_GNU_TYPE)-gcc + RUN_TESTS := endif DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null) @@ -123,7 +130,7 @@ build-deb-stamp: $(MAKE) -C build-deb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' $(MAKE) -C contrib gnome-ssh-askpass2 CC='$(CC) $(OPTFLAGS) -g -Wall -Wl,--as-needed' -ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) +ifeq ($(RUN_TESTS),yes) $(MAKE) -C debian/tests endif @@ -145,7 +152,7 @@ build-udeb-stamp: clean: dh_testdir rm -rf build-deb build-udeb -ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) +ifeq ($(RUN_TESTS),yes) $(MAKE) -C debian/tests clean endif $(MAKE) -C contrib clean -- cgit v1.2.3