[Pkg-bazaar-maint] Proposed change to bzr debian/rules to run more tests

Jelmer Vernooij jelmer at samba.org
Wed Nov 24 18:42:20 UTC 2010


On Wed, 2010-11-24 at 15:29 +0000, Max Bowsher wrote:
> On 24/11/10 13:37, Jelmer Vernooij wrote:
> > Hi Max,
> > 
> > On Wed, 2010-11-24 at 00:19 +0000, Max Bowsher wrote:
> >> I am proposing that in the bzr package, we change:
> >>
> >> common-post-build-indep::
> >>     ./bzr selftest --no-plugins
> >>
> >> to
> >>
> >> common-post-build-arch::
> >>     PYTHONPATH=`pwd`/`python -c 'import sys, distutils.util; print
> >> "build/lib.%s-%s" % (distutils.util.get_platform(), sys.version[0:3])'` \
> >>                `pwd`/`python -c 'import sys; print "build/scripts-%s" %
> >> (sys.version[0:3],)'`/bzr selftest --no-plugins
> >>
> >> .
> >>
> >> The problem with the existing invocation is that it tests bzr without
> >> any of the compiled extensions, so does not truly match what we go on to
> >> install.
> >>
> >> My proposed change is fairly horrid looking - more elegant ways of
> >> achieving this are gratefully accepted.
> > I like the idea of running the tests in an environment that's closer to
> > what is going to end up in the package.
> > 
> > However, I'm not sure the risk of adding this (and getting it wrong) is
> > worth the gain.
> If we get it wrong, the result will be a build failure, not a silent
> test skip, so it's not much of a risk.
It would cause a FTBFS that we'd have to deal with. I'd prefer to have
something less hackish (in particular, using sys.version[0:3] seems
wrong to me). I wonder what'd happen if the default python doesn't match
the python setup.py happens to be run with. There is also nothing that
guarantees that the extensions are actually present in that particular
test run. 

If we want to run the tests with all the extensions, could we just run
"make extensions" first? I realize this causes a slight bit of overhead
because we'd be building them more than once, but I think this is a fair
tradeoff.

> > If we run the tests from the build directory then that
> > means we'll use the extensions but it'll still be different from what
> > actually gets installed.
> Technically true, though OOI, I am not aware of it differing in any
> substantial way. Are you?
No, but that's exactly the kind of issue we're trying to find by running the
tests here. I don't expect to find any genuine bugs in upstream Bazaar
by running the tests here (as we only merge from bzr.dev or release
branches, which have passed PQM), but rather errors in the packaging.
Missing dependencies, or newer versions of dependencies that are
required.

> > And we don't run the tests of the plugins that
> > are bundled yet.
> Why are we executing selftest with --no-plugins anyway? Is it just for
> the convenience of people hacking on the package outside of a minimal
> chroot environment? Can we simply do BZR_PLUGIN_PATH=-user:-site instead?
Yeah, it's for people hacking outside of a minimal chroot environment or
chroots that happen to have other bzr plugins installed. 

I wasn't aware BZR_PLUGIN_PATH supported anything like -site or -user. +1 on modifying BZR_PLUGIN_PATH that way and avoiding --no-plugins.

Cheers,

Jelmer



More information about the Pkg-bazaar-maint mailing list