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
=== modified file 'debian/changelog'
--- debian/changelog 2011-02-27 11:16:51 +0000
+++ debian/changelog 2011-02-28 17:21:27 +0000
@@ -1,4 +1,4 @@
1bzr-builddeb (2.7) UNRELEASED; urgency=low1bzr-builddeb (2.7) unstable; urgency=low
22
3 [ James Westby ]3 [ James Westby ]
44
@@ -34,6 +34,7 @@
34 changelog and larstiq mode. LP: #61929534 changelog and larstiq mode. LP: #619295
35 * The deb: directory service has been renamed to apt: to avoid35 * The deb: directory service has been renamed to apt: to avoid
36 confusion.36 confusion.
37<<<<<<< TREE
37 * When building with distribution set to UNRELEASED, it is now assumed38 * When building with distribution set to UNRELEASED, it is now assumed
38 the build is targetted at the same distribution as the build before.39 the build is targetted at the same distribution as the build before.
3940
@@ -42,6 +43,11 @@
42 * Add devscripts to Build-Depends-Indep, the test suite runs dch.43 * Add devscripts to Build-Depends-Indep, the test suite runs dch.
4344
44 -- Jelmer Vernooij <jelmer@debian.org> Sun, 27 Feb 2011 03:08:09 +010045 -- Jelmer Vernooij <jelmer@debian.org> Sun, 27 Feb 2011 03:08:09 +0100
46=======
47 * Support running the test suite in parallel during package build.
48
49 -- Jelmer Vernooij <jelmer@debian.org> Sat, 26 Feb 2011 15:45:12 +0100
50>>>>>>> MERGE-SOURCE
4551
46bzr-builddeb (2.6) unstable; urgency=low52bzr-builddeb (2.6) unstable; urgency=low
4753
4854
=== modified file 'debian/control'
--- debian/control 2011-02-26 18:41:42 +0000
+++ debian/control 2011-02-28 17:21:27 +0000
@@ -4,7 +4,11 @@
4Maintainer: Debian Bazaar Maintainers <pkg-bazaar-maint@lists.alioth.debian.org>4Maintainer: Debian Bazaar Maintainers <pkg-bazaar-maint@lists.alioth.debian.org>
5Uploaders: Reinhard Tartler <siretart@tauware.de>, James Westby <james.westby@ubuntu.com>, Jelmer Vernooij <jelmer@debian.org>5Uploaders: Reinhard Tartler <siretart@tauware.de>, James Westby <james.westby@ubuntu.com>, Jelmer Vernooij <jelmer@debian.org>
6Build-Depends: debhelper (>= 5.0.37.2), python-all (>= 2.3.5-11)6Build-Depends: debhelper (>= 5.0.37.2), python-all (>= 2.3.5-11)
7<<<<<<< TREE
7Build-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, devscripts8Build-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
9=======
10Build-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
11>>>>>>> MERGE-SOURCE
8Vcs-Bzr: http://bzr.debian.org/pkg-bazaar/bzr-builddeb/unstable12Vcs-Bzr: http://bzr.debian.org/pkg-bazaar/bzr-builddeb/unstable
9Vcs-Browser: http://bzr.debian.org/loggerhead/pkg-bazaar/bzr-builddeb/unstable13Vcs-Browser: http://bzr.debian.org/loggerhead/pkg-bazaar/bzr-builddeb/unstable
10XS-Python-Version: >= 2.414XS-Python-Version: >= 2.4
1115
=== modified file 'debian/rules'
--- debian/rules 2011-02-03 13:38:09 +0000
+++ debian/rules 2011-02-28 17:21:27 +0000
@@ -19,10 +19,19 @@
19 rst2html README > README.html19 rst2html README > README.html
20 touch $@20 touch $@
2121
22ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
23SELFTEST_CONCURRENCY = BZR_CONCURRENCY=$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
24SELFTEST_PARALLEL = --parallel=fork
25else
26SELFTEST_CONCURRENCY =
27SELFTEST_PARALLEL =
28endif
29
22build-python%:30build-python%:
23 python$* setup.py build31 python$* setup.py build
24ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))32ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
25 BZR_PLUGINS_AT=builddeb@$(CURDIR) python$* /usr/bin/bzr selftest -s bp.builddeb33 $(SELFTEST_CONCURRENCY) BZR_PLUGINS_AT=builddeb@$(CURDIR) python$* /usr/bin/bzr selftest \
34 $(SELFTEST_PARALLEL) -v -s bp.builddeb
26endif35endif
27 touch $@-stamp36 touch $@-stamp
2837

Subscribers

People subscribed via source and target branches