aboutsummaryrefslogtreecommitdiff
path: root/t/t9800-git-p4-basic.sh
Commit message (Collapse)AuthorAge
* git p4 test: display unresolvable host errorPete Wyckoff2012-11-26
| | | | | | | This test passes already. Make sure p4 diagnostic errors are displayed. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4: catch p4 errors when streaming file contentsPete Wyckoff2012-11-26
| | | | | | | | | | | | | | | Error messages that arise during the "p4 print" phase of generating commits were silently ignored. Catch them, abort the fast-import, and exit. Without this fix, the sync/clone appears to work, but files that are inaccessible by the p4d server will still be imported to git, although without the proper contents. Instead the errant files will contain a p4 error message, such as "Librarian checkout //depot/path failed". Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4 test: refactor marshal_dumpPete Wyckoff2012-07-05
| | | | | | | | | This function will be useful in future tests. Move it to the git-p4 test library. Let it accept an optional argument to pick a certain marshaled object out of the input stream. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4 test: fix badp4dir testPete Wyckoff2012-06-27
| | | | | | | | | | | | | | | | The construct used to get the return code was flawed, in that errors in the &&-chain before the semicolon were not caught. Use the standard test_expect_code instead. Set PATH in a subshell instead of relying on the bashism of setting it just for a single command. And fix the grep line so it doesn't worry about grep segfaults, and doesn't fail for i18n issues. Reported-by: Johannes Sixt <j.sixt@viscovery.net> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4 test: split up big t9800 testPete Wyckoff2012-06-27
| | | | | | | | | | | | | | | | | | | | | | | | The original t9800 test code has a mix of assorted topics, some of which are big enough to deserve their own homes. Interdependencies between the topics make it confusing when trying to study one in isolation. And it takes so long to run that debugging an individual test is difficult. Split out three big chunks of tests into their own files: t9812-git-p4-wildcards.sh gets the 8 p4 wildcard tests t9813-git-p4-preserve-users.sh gets the 4 --preserve-user tests t9814-git-p4-rename.sh gets the 2 copy and rename tests Test 9800 execution time drops from 29 sec to 9 sec. The sequential time to run all tests is a slower due to the three extra p4d startup/shutdown sequences, but the overall parallel execution time is about the same, at 52 sec. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4 test: cleanup_git should make a new $gitPete Wyckoff2012-06-27
| | | | | | | | | For convenience, leave one in place at the end of each test so that it is not necessary to build a new one. This makes it consistent with $cli. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4 test: copy source indeterminatePete Wyckoff2012-06-27
| | | | | | | | | | Msysgit testing showed that the source file found by copy detection is indeterminate when there are multiple sources to choose from. This appears to be valid. Adjust the test so that it passes if it finds any of the potential copy sources. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4 test: check for error message in failed testPete Wyckoff2012-06-27
| | | | | | | Make sure the test fails for the expected reason. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4 test: simplify quoting involving TRASH_DIRECTORYPete Wyckoff2012-06-27
| | | | | | | | | For temporary files that are created in the top-level TRASH_DIRECTORY, trust that the tests do not chdir except in subshells, and avoid some quoting. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4: submit files with wildcardsPete Wyckoff2012-04-30
| | | | | | | | | | | | | | | | | | | | | | | | | | There are four wildcard characters in p4. Files with these characters can be added to p4 repos using the "-f" option. They are stored in %xx notation, and when checked out, p4 converts them back to normal. When adding files with wildcards in git, the submit path must be careful to use the encoded names in some places, and it must use "-f" to add them. All other p4 commands that operate on the client directory expect encoded filenames as arguments. Support for wildcards in the clone/sync path was added in 084f630 (git-p4: decode p4 wildcard characters, 2011-02-19), but that change did not handle the submit path. There was a problem with wildcards in the sync path too. Commit 084f630 (git-p4: decode p4 wildcard characters, 2011-02-19) handled files with p4 wildcards that were added or modified in p4. Do this for deleted files, and also in branch detection checks, too. Reported-by: Luke Diamand <luke@diamand.org> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4: Fixing script editor checksLuke Diamand2012-04-11
| | | | | | | | If P4EDITOR is defined, the tests will fail when "git p4" starts an editor. Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git p4: use "git p4" directly in testsPete Wyckoff2012-04-09
| | | | | | | | | | | | Drop the $GITP4 variable that was used to specify the script in contrib/fast-import/. The command is called "git p4" now, not "git-p4". Note that configuration variables will remain in a section called "git-p4". Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-p4: remove bash-ism in t9800Pete Wyckoff2012-02-26
| | | | | | | | | | | | | | | | | | | | | | | | | This works in both bash and dash: $ bash -c 'VAR=1 env' | grep VAR VAR=1 $ dash -c 'VAR=1 env' | grep VAR VAR=1 But environment variables assigned this way are not necessarily propagated through a function in POSIX compliant shells: $ bash -c 'f() { "$@" }; VAR=1 f "env"' | grep VAR VAR=1 $ dash -c 'f() { "$@" }; VAR=1 f "env"' | grep VAR Fix constructs like this, in particular, setting variables through test_must_fail. Based-on-patch-by: Vitor Antunes <vitor.hda@gmail.com> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-p4: test cloning with two dirs, clarify docPete Wyckoff2011-12-27
| | | | | | | | | | | | | | | | | | | | | Document how git-p4 currently works when specifying multiple depot paths: 1. No branches or directories are named. 2. Conflicting files are silently ignored---the last change wins. 2. Option --destination is required, else the last path is construed to be a directory. 3. Revision specifiers must be the same on all paths for them to take effect. Test this behavior. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rename git-p4 testsPete Wyckoff2011-12-27
Use consistent naming for all tests: "t98<num>-git-p4-<topic>.sh" Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>