summaryrefslogtreecommitdiff
path: root/t/lib-git-p4.sh
AgeCommit message (Collapse)AuthorFilesLines
2012-08-11git p4 test: move client_view() function to libraryLibravatar Pete Wyckoff1-0/+17
This code will be useful in --detect-branches --use-client-spec tests. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-05git p4 test: refactor marshal_dumpLibravatar Pete Wyckoff1-0/+13
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>
2012-06-27git p4 test: cleanup_git should make a new $gitLibravatar Pete Wyckoff1-1/+2
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>
2012-06-27git p4 test: never create default test repoLibravatar Pete Wyckoff1-0/+4
Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-27git p4 test: use real_path to resolve p4 client symlinksLibravatar Pete Wyckoff1-1/+1
The p4 program is finicky about making sure the recorded client Root matches the current working directory. The way it discovers the latter seems to be to inspect shell variable $PWD. This could involve symlinks, that while leading to the same place as the client Root, look different, and cause p4 to fail. Resolve all client paths using "test-path-utils real_path $path". This removes ".." and resolves all symlinks. Discovered while running with --root=/dev/shm, which is a link to /run/shm. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-27git p4 test: wait longer for p4d to start and test its pidLibravatar Pete Wyckoff1-6/+32
Running tests at high parallelism on a slow machine, 5 sec is not enough to wait for p4d to start. Change it to 5 minutes, adding an environment variable P4D_START_PATIENCE to shrink that if needed in automated test environments. Also check if the pid of the p4d that we started is still around. If not, quit waiting for it immediately. Remove all the confusing && chaining and simplify the code. Thanks-to: Junio C Hamano <gitster@pobox.com> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-24git p4: Squash P4EDITOR in test harnessLibravatar Luke Diamand1-0/+1
If P4EDITOR is set in the environment, test behavior could be unpredictable. Set it explicitly. Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-09git p4: use "git p4" directly in testsLibravatar Pete Wyckoff1-5/+3
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>
2012-04-09git-p4: move to toplevelLibravatar Pete Wyckoff1-1/+1
Move git-p4 out of contrib/fast-import into the main code base, aside other foreign SCM tools. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-17git-p4 tests: refactor and cleanupLibravatar Pete Wyckoff1-0/+74
Introduce a library for functions that are common to multiple git-p4 test files. Be a bit more clever about starting and stopping p4d. Specify a unique port number for each test, so that tests can run in parallel. Start p4d not in daemon mode, and save the pid, to be able to kill it cleanly later. Never kill p4d at startup; always shutdown cleanly. Handle directory changes better. Always chdir inside a subshell, and remove any post-test directory changes. Clean up whitespace, and use test_cmp and test_must_fail more consistently. Separate the tests related to detecting p4 branches into their own file, and add a few more. Acked-by: Luke Diamand <luke@diamand.org> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>