git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/4] Add more tests of cvsimport

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Feb 20, 2009, 05:18 UTC
Message-ID
<1235107093-32605-1-git-send-email-mhagger@alum.mit.edu>

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

Next: Michael Haggerty
Message 1 of 24 in “Add more tests of cvsimport”
  1. 0/4 Add more tests of cvsimportMichael Haggerty, Feb 20, 2009
  2. 1/4 Start a library for cvsimport-related testsMichael Haggerty, Feb 20, 2009
  3. 2/4 Use CVS's -f option if available (ignore user's ~/.cvsrc file)Michael Haggerty, Feb 20, 2009
  4. 3/4 Test contents of entire cvsimported "master" tree contentsMichael Haggerty, Feb 20, 2009
  5. 4/4 Add some tests of git-cvsimport's handling of vendor branchesMichael Haggerty, Feb 20, 2009
  6. Jeff KingFeb 20, 2009
  7. Junio C HamanoFeb 20, 2009
  8. Michael HaggertyFeb 20, 2009
  9. Teach the '--exclude' option to 'diff --no-index'Johannes Schindelin, Feb 20, 2009
  10. Jeff KingFeb 20, 2009
  11. Johannes SchindelinFeb 20, 2009
  12. Jakub NarebskiFeb 20, 2009
  13. Johannes SchindelinFeb 20, 2009
  14. Junio C HamanoFeb 20, 2009
  15. Johannes SchindelinFeb 24, 2009
  16. Junio C HamanoFeb 24, 2009
  17. Michael HaggertyFeb 20, 2009
  18. Jeff KingFeb 20, 2009
  19. Samuel Lucas Vaz de MelloFeb 20, 2009
  20. Michael HaggertyFeb 21, 2009
  21. Ferry Huberts (Pelagic)Feb 20, 2009
  22. Michael HaggertyFeb 21, 2009
  23. Ferry Huberts (Pelagic)Feb 21, 2009
  24. Junio C HamanoFeb 22, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.