[SCM] Debian package checker branch, master, updated. 2.4.3-263-g40a49c4
The following commit has been merged in the master branch:
commit 40a49c43c15ca741bf8e666c35bb4779e90b2b88
Author: Niels Thykier <niels@thykier.net>
Date: Sun Feb 20 19:41:20 2011 +0100
Support DEB_BUILD_OPTIONS=parallel=n for testing
diff --git a/debian/rules b/debian/rules
index 4084769..76f1d04 100755
--- a/debian/rules
+++ b/debian/rules
@@ -21,11 +21,18 @@ else
testtarget =
endif
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ jobs = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ PAR_ARGS=-j $(jobs)
+endif
+
+
+
runtests: $(neededfiles) $(allchecks) $(allcollect) $(tagfiles) $(testfiles)
@echo .... running tests ....
rm -rf debian/tests
mkdir debian/tests
- private/runtests $(onlyrun)
+ private/runtests $(PAR_ARGS) $(onlyrun)
if [ "$(onlyrun)" = "" ]; then touch $@; fi
# Like runtests but only runs tests affecting a particular tag. That tag
@@ -36,7 +43,7 @@ check-tag:
fi
rm -rf debian/tests
mkdir debian/tests
- private/runtests -t $(tag)
+ private/runtests $(PAR_ARGS) -t $(tag)
# this target is only run manually
refresh-perl-provides:
diff --git a/private/runtests b/private/runtests
index aba2291..b4add05 100755
--- a/private/runtests
+++ b/private/runtests
@@ -2,6 +2,15 @@
set -e
+if [ "$1" = "-j" ] ; then
+ NUMJOBS="$2"
+ test "$NUMJOBS" -gt 0 || (
+ echo "$NUMJOBS is not an integer greater than 0" >&2 && exit 1)
+ PARALLEL_ARGS="-j $NUMJOBS"
+ shift
+ shift
+fi
+
if [ "$1" = "-t" ] ; then
TAG=yes
fi
@@ -28,7 +37,7 @@ if [ ! -e "$LOCPATH"/en_US.UTF-8 ] ; then
--quiet "$LOCPATH"/en_US.UTF-8 || fail "Locale generation failed"
fi
-t/runtests -k t debian/tests "$@"
+t/runtests -k $PARALLEL_ARGS t debian/tests "$@"
if [ "$TAG" = "" ] ; then
testset/runtests -k testset debian/tests "$@"
fi
--
Debian package checker
Reply to: