summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorJulien Cristau <jcristau@debian.org>2009-10-04 20:24:27 +0200
committerJulien Cristau <jcristau@debian.org>2009-10-04 20:24:27 +0200
commit1a21d9f69c23e496cf8af3a95b25beb413bc4442 (patch)
tree430ce0cf4b9921a719cbf224511202b85c6d372c /debian/rules
parent01e2291f5f2675858bc370c9f2772e6f6583d461 (diff)
Run unit tests when building the package
Add build-dep on libglib2.0-dev, xkb-data and x11-xkb-utils for unit tests, and run the tests unless nocheck is in DEB_BUILD_OPTIONS.
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules14
1 files changed, 12 insertions, 2 deletions
diff --git a/debian/rules b/debian/rules
index 741cf5dc0..663a4e0e7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -47,6 +47,11 @@ else
dri = --enable-dri --enable-dri2
config_hal = --enable-config-hal
endif
+ifneq (,$(filter nocheck, $(DEB_BUILD_OPTIONS)))
+ config_tests = --disable-unit-tests
+else
+ config_tests = --enable-unit-tests
+endif
INSTALL=/usr/bin/install
@@ -59,6 +64,7 @@ confflags += \
--without-dtrace \
--disable-werror \
--disable-debug \
+ $(config_tests) \
--with-int10=x86emu \
--with-os-vendor="$(VENDOR)" \
--with-builderstring="$(SOURCE_NAME) $(SOURCE_VERSION) ($(BUILDER))" \
@@ -129,16 +135,20 @@ obj-$(DEB_BUILD_GNU_TYPE)/config.status: configure
CPPFLAGS="$(CPPFLAGS)"
-build: build-stamp
+build: build-stamp tests-stamp
build-stamp: obj-$(DEB_BUILD_GNU_TYPE)/config.status
dh_testdir
cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE)
>$@
+tests-stamp: build-stamp
+ cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE) check
+ >$@
+
clean: xsfclean
dh_testdir
dh_testroot
- rm -f build-stamp
+ rm -f build-stamp tests-stamp
rm -f config.cache config.log config.status
rm -f */config.cache */config.log */config.status