Merge lp:~jelmer/bzr-builddeb/parallel-test into lp:bzr-builddeb

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: 528
Merged at revision: 533
Proposed branch: lp:~jelmer/bzr-builddeb/parallel-test
Merge into: lp:bzr-builddeb
Diff against target: 69 lines (+21/-2) (has conflicts)
3 files modified
debian/changelog (+7/-1)
debian/control (+4/-0)
debian/rules (+10/-1)
Text conflict in debian/changelog
Text conflict in debian/control
To merge this branch: bzr merge lp:~jelmer/bzr-builddeb/parallel-test
Reviewer Review Type Date Requested Status
James Westby Approve
Review via email: mp+51414@code.launchpad.net

Description of the change

Enable parallel running of the tests during package build if enabled using DEB_BUILD_OPTIONS=parallel=X. This makes quite a bit of a difference on quad-core machines.

To post a comment you must log in.
Revision history for this message
James Westby (james-w) wrote :

What does --parallel=fork do if BZR_CONCURRENCY is unset?

Thanks,

James

Revision history for this message
Robert Collins (lifeless) wrote :

On Sun, Feb 27, 2011 at 8:33 AM, James Westby <email address hidden> wrote:
> What does --parallel=fork do if BZR_CONCURRENCY is unset?

probes the machine for available cores. E.g. on a 4-core machine, runs
4 workers.

-Rob

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Hmm, perhaps we should force it to BZR_CONCURRENCY=1 if parallel isn't in DEB_BUILD_OPTIONS?

Revision history for this message
Robert Collins (lifeless) wrote :

On Sun, Feb 27, 2011 at 11:07 AM, Jelmer Vernooij <email address hidden> wrote:
> Hmm, perhaps we should force it to BZR_CONCURRENCY=1 if parallel isn't in DEB_BUILD_OPTIONS?

why? That would be slower than just not passing --parallel in. And
unlike make -j, bzr won't spawn until death, it creates precisely the
number of workers as there are cpus.

Revision history for this message
James Westby (james-w) wrote :

On Sat, 26 Feb 2011 22:17:08 -0000, Robert Collins <email address hidden> wrote:
> On Sun, Feb 27, 2011 at 11:07 AM, Jelmer Vernooij <email address hidden> wrote:
> > Hmm, perhaps we should force it to BZR_CONCURRENCY=1 if parallel isn't in DEB_BUILD_OPTIONS?
>
> why? That would be slower than just not passing --parallel in. And
> unlike make -j, bzr won't spawn until death, it creates precisely the
> number of workers as there are cpus.

Well, don't pass --parallel in that case then.

I would think that the implied meaning of not passing parallel=n would
be parallel=1.

Thanks,

James

Revision history for this message
Robert Collins (lifeless) wrote :

On Sun, Feb 27, 2011 at 11:32 AM, James Westby
<email address hidden> wrote:
> On Sat, 26 Feb 2011 22:17:08 -0000, Robert Collins <email address hidden> wrote:
>> On Sun, Feb 27, 2011 at 11:07 AM, Jelmer Vernooij <email address hidden> wrote:
>> > Hmm, perhaps we should force it to BZR_CONCURRENCY=1 if parallel isn't in DEB_BUILD_OPTIONS?
>>
>> why? That would be slower than just not passing --parallel in. And
>> unlike make -j, bzr won't spawn until death, it creates precisely the
>> number of workers as there are cpus.
>
> Well, don't pass --parallel in that case then.
>
> I would think that the implied meaning of not passing parallel=n would
> be parallel=1.

I don't recall debian policy saying anything specific. Anyhow, as I
say, bzr handles default parallelism much better than make and many
other similar tools.

-Rob

Revision history for this message
James Westby (james-w) wrote :

To be clear, I'm happy to merge this if the lack of parallel= gives
a non-parallel run.

Thanks,

James

review: Needs Fixing
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

On Mon, 2011-02-28 at 16:37 +0000, James Westby wrote:
> Review: Needs Fixing
> To be clear, I'm happy to merge this if the lack of parallel= gives
> a non-parallel run.
Thanks. I've pushed a new revision that only specifies --parallel and
BZR_CONCURRENCY if parallel was set in DEB_BUILD_OPTIONS.

Cheers,

Jelmer

528. By Jelmer Vernooij

Only use --parallel=fork if DEB_BUILD_OPTIONS had parallel= set.

Revision history for this message
James Westby (james-w) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2011-02-27 11:16:51 +0000
3+++ debian/changelog 2011-02-28 17:21:27 +0000
4@@ -1,4 +1,4 @@
5-bzr-builddeb (2.7) UNRELEASED; urgency=low
6+bzr-builddeb (2.7) unstable; urgency=low
7
8 [ James Westby ]
9
10@@ -34,6 +34,7 @@
11 changelog and larstiq mode. LP: #619295
12 * The deb: directory service has been renamed to apt: to avoid
13 confusion.
14+<<<<<<< TREE
15 * When building with distribution set to UNRELEASED, it is now assumed
16 the build is targetted at the same distribution as the build before.
17
18@@ -42,6 +43,11 @@
19 * Add devscripts to Build-Depends-Indep, the test suite runs dch.
20
21 -- Jelmer Vernooij <jelmer@debian.org> Sun, 27 Feb 2011 03:08:09 +0100
22+=======
23+ * Support running the test suite in parallel during package build.
24+
25+ -- Jelmer Vernooij <jelmer@debian.org> Sat, 26 Feb 2011 15:45:12 +0100
26+>>>>>>> MERGE-SOURCE
27
28 bzr-builddeb (2.6) unstable; urgency=low
29
30
31=== modified file 'debian/control'
32--- debian/control 2011-02-26 18:41:42 +0000
33+++ debian/control 2011-02-28 17:21:27 +0000
34@@ -4,7 +4,11 @@
35 Maintainer: Debian Bazaar Maintainers <pkg-bazaar-maint@lists.alioth.debian.org>
36 Uploaders: Reinhard Tartler <siretart@tauware.de>, James Westby <james.westby@ubuntu.com>, Jelmer Vernooij <jelmer@debian.org>
37 Build-Depends: debhelper (>= 5.0.37.2), python-all (>= 2.3.5-11)
38+<<<<<<< TREE
39 Build-Depends-Indep: bzr (>= 2.1~), python-central (>= 0.5.8), python-docutils, python-debian (>= 0.1.11), python-apt, patchutils, python-testtools (>= 0.9.2), pristine-tar, devscripts
40+=======
41+Build-Depends-Indep: bzr (>= 2.1~), python-central (>= 0.5.8), python-docutils, python-debian (>= 0.1.11), python-apt, patchutils, python-testtools (>= 0.9.2), pristine-tar, python-subunit
42+>>>>>>> MERGE-SOURCE
43 Vcs-Bzr: http://bzr.debian.org/pkg-bazaar/bzr-builddeb/unstable
44 Vcs-Browser: http://bzr.debian.org/loggerhead/pkg-bazaar/bzr-builddeb/unstable
45 XS-Python-Version: >= 2.4
46
47=== modified file 'debian/rules'
48--- debian/rules 2011-02-03 13:38:09 +0000
49+++ debian/rules 2011-02-28 17:21:27 +0000
50@@ -19,10 +19,19 @@
51 rst2html README > README.html
52 touch $@
53
54+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
55+SELFTEST_CONCURRENCY = BZR_CONCURRENCY=$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
56+SELFTEST_PARALLEL = --parallel=fork
57+else
58+SELFTEST_CONCURRENCY =
59+SELFTEST_PARALLEL =
60+endif
61+
62 build-python%:
63 python$* setup.py build
64 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
65- BZR_PLUGINS_AT=builddeb@$(CURDIR) python$* /usr/bin/bzr selftest -s bp.builddeb
66+ $(SELFTEST_CONCURRENCY) BZR_PLUGINS_AT=builddeb@$(CURDIR) python$* /usr/bin/bzr selftest \
67+ $(SELFTEST_PARALLEL) -v -s bp.builddeb
68 endif
69 touch $@-stamp
70

Subscribers

People subscribed via source and target branches