aboutsummaryrefslogtreecommitdiff
path: root/t/t9600-cvsimport.sh
Commit message (Collapse)AuthorAge
* cvsimport: handle the parsing of uppercase config optionsMichael J Gruber2011-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | The current code leads to fatal: bad config value for 'cvsimport.r' in .git/config for a standard use case with cvsimport.r set. cvsimport sets internal variables by checking the config for each possible command line option. The problem is that config items are case insensitive, so config.r and config.R are the same. The ugly error is due to that fact that cvsimport expects a bool for -R (and thus config.R) but a remote name for -r (and thus config.r). Fix this by making cvsimport expect long names for uppercase options. config options for cvsimport have been undocumented so far, though present in the code and advertised in several tutorials. So one may read "enhance" for "fix". Similarly, the names for the options are "documented" in the code, waitiing for their lowercase equivalents to be transformed into long config options, as well. Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'jl/maint-fix-test'Junio C Hamano2010-09-06
|\ | | | | | | | | | | | | | | * jl/maint-fix-test: Several tests: cd inside subshell instead of around Conflicts: t/t9600-cvsimport.sh
| * Several tests: cd inside subshell instead of aroundJens Lehmann2010-09-06
| | | | | | | | | | | | | | | | | | | | Fixed all places where it was a straightforward change from cd'ing into a directory and back via "cd .." to a cd inside a subshell. Found these places with "git grep -w "cd \.\.". Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | t/t9600-cvsimport.sh: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason2010-08-18
|/ | | | | | | | | Change this test to skip test with test prerequisites, and to do setup work in tests. This improves the skipped statistics on platforms where the test isn't run. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* tests: Skip tests in a way that makes sense under TAPÆvar Arnfjörð Bjarmason2010-06-25
| | | | | | | | | | SKIP messages are now part of the TAP plan. A TAP harness now knows why a particular test was skipped and can report that information. The non-TAP harness built into Git's test-lib did nothing special with these messages, and is unaffected by these changes. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* cvsimport: new -R option: generate .git/cvs-revisions mappingAaron Crane2010-02-06
| | | | | | | | | | This option causes the creation or updating of a file mapping CVS (filename, revision number) pairs to Git commit IDs. This is expected to be useful if you have CVS revision numbers stored in commit messages, bug-tracking systems, email archives, and the like. Signed-off-by: Aaron Crane <git@aaroncrane.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'hv/cvsps-tests'Junio C Hamano2009-07-29
|\ | | | | | | | | | | | | | | | | | | | | | | * hv/cvsps-tests: t/t9600: remove exit after test_done cvsimport: extend testcase about patchset order to contain branches cvsimport: add test illustrating a bug in cvsps Add a test of "git cvsimport"'s handling of tags and branches Add some tests of git-cvsimport's handling of vendor branches Test contents of entire cvsimported "master" tree contents Use CVS's -f option if available (ignore user's ~/.cvsrc file) Start a library for cvsimport-related tests
| * Test contents of entire cvsimported "master" tree contentsMichael Haggerty2009-02-23
| | | | | | | | | | | | | | Test added for completeness (it passes). Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Use CVS's -f option if available (ignore user's ~/.cvsrc file)Michael Haggerty2009-02-23
| | | | | | | | | | | | | | | | | | A user's ~/.cvsrc file can change the basic behavior of CVS commands. Therefore we should ignore it in order to ensure consistent results from the test suite. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Start a library for cvsimport-related testsMichael Haggerty2009-02-23
| | | | | | | | | | | | | | | | For now the library just includes code (moved from t/t9600-cvsimport.sh) that checks whether the prerequisites for "git cvsimport" are installed. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | tests: skip perl tests if NO_PERL is definedJeff King2009-04-08
| | | | | | | | | | | | | | | | | | | | These scripts all test git programs that are written in perl, and thus obviously won't work if NO_PERL is defined. We pass NO_PERL to the scripts from the building Makefile via the GIT-BUILD-OPTIONS file. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | tests: remove exit after test_done callJeff King2009-04-05
|/ | | | | | | test_done always exits, so this line is never executed. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* tests: use "git foo" without dash in stringsNanako Shiraishi2008-09-09
| | | | | | | | This changes "git-foo" to "git foo" when message strings in tests name git subcommands. Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Testsuite: Unset CVS_SERVERFabian Emmes2008-07-19
| | | | | | | | | The CVS_SERVER environment variable can cause some of the cvsimport tests to fail. So unset this variable at the beginning of the test script. Signed-off-by: Fabian Emmes <fabian.emmes@rwth-aachen.de> Signed-off-by: Lars Noschinski <lars@public.noschinski.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t9600: allow testing with cvsps 2.2, including beta versionsPavel Roskin2008-07-15
| | | | | | | | We've supported cvsps 2.1 so far. Newer 2.2b1 (beta) seems to work with us, too. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* tests: do not use implicit "git diff --no-index"Junio C Hamano2008-05-24
| | | | | | | | | | | As a general principle, we should not use "git diff" to validate the results of what git command that is being tested has done. We would not know if we are testing the command in question, or locating a bug in the cute hack of "git diff --no-index". Rather use test_cmp for that purpose. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Fix tests breaking when checkout path contains shell metacharactersBryan Donlan2008-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the remainder of the issues where the test script itself is at fault for failing when the git checkout path contains whitespace or other shell metacharacters. The majority of git svn tests used the idiom test_expect_success "title" "test script using $svnrepo" These were changed to have the test script in single-quotes: test_expect_success "title" 'test script using "$svnrepo"' which unfortunately makes the patch appear larger than it really is. One consequence of this change is that in the verbose test output the value of $svnrepo (and in some cases other variables, too) is no longer expanded, i.e. previously we saw * expecting success: test script using /path/to/git/t/trash/svnrepo but now it is: * expecting success: test script using "$svnrepo" Signed-off-by: Bryan Donlan <bdonlan@fushizen.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t9600-cvsimport.sh: set HOME before checking for cvsps availabilityFrank Lichtenheld2008-03-26
| | | | | | | | | | | | | | | | | | | | | | | | | This actually sounds like a bug in cvsps, which requires an existing home directory when asked for the usage through -h $ HOME=/nonexistent cvsps -h Cannot create the cvsps directory '.cvsps': No such file or directory This made t9600 think that cvsps is not available if HOME did not exist, causing the tests to be skipped $ HOME=/nonexistent sh t9600-cvsimport.sh * skipping cvsimport tests, cvsps not found * passed all 0 test(s) Now t9600 sets HOME to the current working directory before checking for the availability of the cvsps program. This issue has been discovered by Marco Rodrigues, and fixed by Frank Lichtenheld through http://bugs.debian.org/471969 Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t9600: require cvsps 2.1 to perform testsJeff King2007-12-04
| | | | | | | | | | git-cvsimport won't run at all with less than cvsps 2.1, because it lacks the -A flag. But there's no point in preventing people who have an old cvsps from running the full testsuite. Tested-by: A Large Angry SCM <gitzilla@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t9600: test cvsimport from CVS working treeJeff King2007-12-02
| | | | | | | This test passes with v1.5.3.7, but not with v1.5.3.6. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* cvsimport: fix usage of cvsimport.moduleJeff King2007-11-30
| | | | | | | | | | | | | | | | | | | | | There were two problems: 1. We only look at the config variable if there is no module given on the command line. We checked this by comparing @ARGV == 0. However, at the time of the comparison, we have not yet parsed the dashed options, meaning that "git cvsimport" would read the variable but "git cvsimport -a" would not. This is fixed by simply moving the check after the call to getopt. 2. If the config variable did not exist, we were adding an empty string to @ARGV. The rest of the script, rather than barfing for insufficient input, would then try to import the module '', leading to rather confusing error messages. Based on patch from Emanuele Giaquinta. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* cvsimport: use rev-parse to support packed refsJeff King2007-11-28
| | | | | | | | | | Previously, if refs were packed, git-cvsimport would assume that particular refs did not exist. This could lead to, for example, overwriting previous 'origin' commits that were packed. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Add basic cvsimport testsJeff King2007-11-28
We weren't even testing basic things before, so let's at least try importing and updating a trivial repository, which will catch total breakage. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>