git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Add more tests of cvsimport
@ 2009-02-20  5:18 Michael Haggerty
  2009-02-20  5:18 ` [PATCH 1/4] Start a library for cvsimport-related tests Michael Haggerty
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Michael Haggerty @ 2009-02-20  5:18 UTC (permalink / raw)
  To: git; +Cc: gitster, peff, Michael Haggerty

The test suite for "git cvsimport" is pretty limited, and I would like
to improve the situation.  This patch series contains the first of
what I hope will eventually be several additions to the "git
cvsimport" test suite.

I am the maintainer of cvs2svn/cvs2git.  Most of the new tests will
probably use fragments from the cvs2svn test suite.  I should admit
that part of my motivation for adding tests to the "git cvsimport"
test suite is to document its weaknesses, which do not seem to be
especially well known.

Patch 1 splits out some code into a library usable by multiple
CVS-related tests.

Patch 2 changes the library to add the -f option when invoking cvs (to
make it ignore the user's ~/.cvsrc file).

Patch 3 adds a new test to t9600, namely to compare the entire module
as checked out by CVS vs. git.

Patch 4 adds a new test script t9601 that tests "git cvsimport"'s
handling of CVS vendor branches.  One of these tests fails due to an
actual bug.

These ideas in the patches are logically independent of each other,
but each patch assumes that the previous patches have been applied.

I would like to point out a few things about these patches that seem a
little bit unprecedented in the git test suite.  If other approaches
would be preferred, please let me know.

The first is that I would like to introduce a library that can be used
by the "git cvsimport" tests in the t96xx series, simply to avoid code
duplication.  I put this library in t/t96xx/cvs-lib.sh, to hopefully
make its role clear.  The library has to be sourced from the main test
directory.  (It sources test-lib.sh indirectly.)

The second is that the new test script uses a small CVS repository
that is part of the test suite (i.e., the *,v files are committed
directly into the git source tree).  This is different than the
approach of t9600, which creates its own test CVS repository using CVS
commands.  The reasons for this are:

- t9600 wants to test incremental import, so it *has to* create the
  repository dynamically.  That is not the case for t9601, which only
  tests a one-shot import.

- The repository for t9601 is derived from one that already exists as
  part of the cvs2svn test suite.  Reverse-engineering it into CVS
  commands would be extra work.

- The code to create CVS repositories via CVS commands is not very
  illuminating, and runs slowly, as CVS throttles commits to 1 per
  second (to ensure unique timestamps).

- Future tests may require even more complicated CVS repositories that
  are even more cumbersome to create, so it's good to set a precedent
  now :-)

Finally, the *,v files comprising the CVS repository have blank
trailing lines, triggering a warning from "git diff --check".  I don't
think that CVS strictly requires the blank lines, but they are always
generated by CVS, so I left them in.  But if the "git diff --check"
warnings are considered a serious problem, the blank lines could
probably be removed.

Cheers,
Michael

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2009-02-24 17:02 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-20  5:18 [PATCH 0/4] Add more tests of cvsimport Michael Haggerty
2009-02-20  5:18 ` [PATCH 1/4] Start a library for cvsimport-related tests Michael Haggerty
2009-02-20  5:18   ` [PATCH 2/4] Use CVS's -f option if available (ignore user's ~/.cvsrc file) Michael Haggerty
2009-02-20  5:18     ` [PATCH 3/4] Test contents of entire cvsimported "master" tree contents Michael Haggerty
2009-02-20  5:18       ` [PATCH 4/4] Add some tests of git-cvsimport's handling of vendor branches Michael Haggerty
2009-02-20  6:25 ` [PATCH 0/4] Add more tests of cvsimport Jeff King
2009-02-20  7:40   ` Junio C Hamano
2009-02-20 11:24     ` Michael Haggerty
2009-02-20 14:12       ` [HALF A PATCH] Teach the '--exclude' option to 'diff --no-index' Johannes Schindelin
2009-02-20 14:53         ` Jeff King
2009-02-20 15:03           ` Johannes Schindelin
2009-02-20 18:34             ` Jakub Narebski
2009-02-20 20:04               ` Johannes Schindelin
2009-02-20 16:34         ` Junio C Hamano
2009-02-24 16:15           ` Johannes Schindelin
2009-02-24 17:01             ` Junio C Hamano
2009-02-20 10:21   ` [PATCH 0/4] Add more tests of cvsimport Michael Haggerty
2009-02-20 15:00     ` Jeff King
2009-02-20 21:26     ` Samuel Lucas Vaz de Mello
2009-02-21  6:32       ` Michael Haggerty
2009-02-20  8:27 ` Ferry Huberts (Pelagic)
2009-02-21 13:05   ` Michael Haggerty
2009-02-21 13:19     ` Ferry Huberts (Pelagic)
2009-02-22 16:49     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).