threads / discuss / 14421

tests for git-p4

Subject: tests for git-p4

## tl;dr

4 messages between Jul 12, 2008 and Jul 13, 2008.

replies: 3people: 3as markdown or json

Matt McClure· Jul 12, 2008, 12:24 UTC · lore
I'm planning to write a "p4-fast-export" that will facilitate using
Bazaar on projects maintained in Perforce.  I'd like to reuse code
from git-p4 since it appears to have much of the functionality I want.
 In fact, the main reason I can't just use git-p4 today is that it
does too much: it pushes the Perforce fast-export representation
directly into Git.  I'm going to work on covering the existing
functionality in tests before I start modifying the code, and I could
try to write those tests such that they'll be useful to the Git
project as well.

Would my tests be of interest to git-p4's authors? Is there any existing test framework for git-p4 that I missed?

Matt
Johannes Schindelin· Jul 12, 2008, 14:36 UTC · re: Matt McClure · lore

Re: tests for git-p4

Hi,
On Sat, 12 Jul 2008, Matt McClure wrote:
> Would my tests be of interest to git-p4's authors?  Is there any 
> existing test framework for git-p4 that I missed?
git$ git shortlog -e -s -n -- contrib/fast-import/git-p4* | head -n 5
   102  Simon Hausmann <simon@lst.de>
    50  Simon Hausmann <shausman@trolltech.com>
    31  Han-Wen Nienhuys <hanwen@google.com>
    13  Simon Hausmann <hausmann@kde.org>
     7  Marius Storm-Olsen <marius@trolltech.com>

Hth, Dscho

Simon Hausmann· Jul 13, 2008, 12:26 UTC · re: Matt McClure · lore

Re: tests for git-p4

On Saturday 12 July 2008 14:24:10 Matt McClure wrote:
Show 12 quoted lines
> I'm planning to write a "p4-fast-export" that will facilitate using
> Bazaar on projects maintained in Perforce.  I'd like to reuse code
> from git-p4 since it appears to have much of the functionality I want.
>  In fact, the main reason I can't just use git-p4 today is that it
> does too much: it pushes the Perforce fast-export representation
> directly into Git.  I'm going to work on covering the existing
> functionality in tests before I start modifying the code, and I could
> try to write those tests such that they'll be useful to the Git
> project as well.
>
> Would my tests be of interest to git-p4's authors?  Is there any
> existing test framework for git-p4 that I missed?

There are currently no automated tests for git-p4. I would certainly be interested, but I forsee difficulties testing the interaction with p4 in a general way independent from a specific server setup.

Simon
Matt McClure· Jul 13, 2008, 18:40 UTC · re: Simon Hausmann · lore

Re: tests for git-p4

On Sun, Jul 13, 2008 at 8:26 AM, Simon Hausmann <simon@lst.de> wrote:
> On Saturday 12 July 2008 14:24:10 Matt McClure wrote:
> There are currently no automated tests for git-p4. I would certainly be
> interested, but I forsee difficulties testing the interaction with p4 in a
> general way independent from a specific server setup.

I can solve that by bootstrapping a p4d server for the tests that need to exercise p4 directly. At higher levels of abstraction, if they evolve, I could replace p4 with a test double that doesn't need a Perforce server.

Matt

← back to recent threads