bzr-p4: Perforce foreign branches for Bazaar

Matt McClure mlm at aya.yale.edu
Tue Aug 5 12:34:30 BST 2008


On Mon, Aug 4, 2008 at 9:06 AM, John Arbash Meinel
<john at arbash-meinel.com> wrote:
> Matt McClure wrote:
> | I pushed a bunch of changes to http://mlm.webfactional.com/bzr-p4
> | today, including NEWS and TODO files to summarize what's done and
> | where I'm headed.
>
> Would you be okay registering this as a project in Launchpad and having
> it mirrored/hosted there? I'm happy to set up the project for you, as
> I'm mostly interested in just getting your branch mirrored, in case
> anything should happen to your net connectivity.

I'd be happy to have it hosted on Launchpad.  I'd prefer to move my
mainline there instead of mirroring it, since it's one less thing to
maintain.  Thanks for offering to set up the project.

> | My next two user stories are:
> |
> |     * As a developer, I want a way to easily run all tests.
> |
> |         Currently, I do 'python test_git_p4.py', followed by 'python
> | test_dogfood.py', etc.  I don't have anything nearly as nice as 'bzr
> | selftest'.
> |
> |     * As a developer, I want continuous integration, automatically
> | triggered, for Windows and Cygwin test execution.
> |
> | How could I leverage Bazaar's test runner, or something similar to
> | fulfill the first?
>
> Bazaar has customized its unittest running quite a bit. If this is meant
> to be a plugin for bzr, the fact that your "__init__.py" has
> 'test_suite()' defined is sufficient for "bzr selftest" to automatically
> find and run all of the tests.
>
> If you wanted to run *just* the plugin tests, you would then do:
>
> bzr selftest -s bzrlib.plugins.p4
>
> (or whatever that plugin is supposed to be named when installed.)

Yep.  I found the plugin docs and created __init__.py after my
previous message.  Using selftest is much nicer than what I was doing
before.

> Then again, looking at your 'setup_env.*' stuff, it seems like your test
> suite is not self contained. (You have to have a P4 server running at a
> known location, etc. And presumably this means it will 'clobber' the
> commit history on the server.)
>
> I don't know enough about P4, but is it possible to start/stop a server
> as part of running your tests? So that you can create a new instance,
> run your tests in it, and then stop and delete that instance? I guess I
> do see that you have a "P4D" class (presumably p4-daemon).

The test suite assumes the p4d executable is available, but it doesn't
require a running server.  It starts/stops a clean server instance on
the configured port.

> | What resources are on Launchpad or elsewhere that I could use for
> | continuous integration?
>
> I don't know of any hosting that currently provides CI for bazaar. I
> know it has been discussed as part of Launchpad (similar to how the PPA,
> etc is configured).
>
> There are 2 ways I can think of to do so

[...]

Thanks for these suggestions.  I'll look into both.  Does Launchpad
provide bzr+ssh and/or PQM hosting?

Matt



More information about the bazaar mailing list