[debhelper-devel] [debhelper] 29/30: Makefile: Run tests in parallel

Niels Thykier nthykier at moszumanska.debian.org
Mon Jul 3 14:40:38 UTC 2017


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

nthykier pushed a commit to branch master
in repository debhelper.

commit 2301d7c0812a55a0a89dc5ffeddf0d5ef05e5da6
Author: Niels Thykier <niels at thykier.net>
Date:   Mon Jul 3 14:31:02 2017 +0000

    Makefile: Run tests in parallel
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 Makefile | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 2b2e8f4..c35ef45 100644
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,12 @@ MANPAGES=$(COMMANDS:=.1) dh.1
 # Find deprecated commands by looking at their synopsis.
 DEPRECATED=$(shell egrep -l '^dh_.* - .*deprecated' $(COMMANDS))
 
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+    TEST_JOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+else
+    TEST_JOBS = 1
+endif
+
 # This generates a list of synopses of debhelper commands, and substitutes
 # it in to the #LIST# line on the man page fed to it on stdin. Must be passed
 # parameters of all the executables or pod files to get the synopses from.
@@ -122,4 +128,4 @@ install:
 	install -m 0644 Debian/Debhelper/Buildsystem/*.pm $(DESTDIR)$(PERLLIBDIR)/Buildsystem
 
 test: version
-	./run perl -MTest::Harness -e 'runtests grep { ! /CVS/ && ! /\.svn/ && -f && -x && m/\.t$$/ } @ARGV' t/* t/*/*
+	HARNESS_OPTIONS=j$(TEST_JOBS) ./run perl -MTest::Harness -e 'runtests grep { ! /CVS/ && ! /\.svn/ && -f && -x && m/\.t$$/ } @ARGV' t/* t/*/*

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




More information about the debhelper-devel mailing list