Make building with DEB_BUILD_OPTIONS=nocheck skip all tests
authorGuido Günther <agx@sigxcpu.org>
Wed, 18 Apr 2012 06:14:40 +0000 (08:14 +0200)
committerGuido Günther <agx@sigxcpu.org>
Wed, 18 Apr 2012 06:14:40 +0000 (08:14 +0200)
heavily based on a patch by Matthijs Kooijman

debian/rules

index 6360dff..2c40bef 100755 (executable)
@@ -15,6 +15,7 @@ PYCHECKER_ARGS=-boptparse --no-override --no-shadowbuiltin
        dh $@ --with python2
 
 override_dh_auto_test:
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
        dh_auto_test
        export GIT_AUTHOR_NAME="Gbp Tests";             \
        export GIT_AUTHOR_EMAIL=tests@example.com;      \
@@ -25,6 +26,9 @@ override_dh_auto_test:
        
        PYTHONPATH=. pychecker $(PYCHECKER_ARGS) -q \
                gbp gbp.scripts gbp.git gbp.deb
+else
+       @echo "Checks disabled via DEB_BUILD_OPTIONS"
+endif
 
 override_dh_auto_build:
        dh_auto_build