git p4 test: cleanup_git should make a new $git
authorPete Wyckoff <pw@padd.com>
Wed, 27 Jun 2012 12:01:01 +0000 (08:01 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 28 Jun 2012 04:06:35 +0000 (21:06 -0700)
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>
t/lib-git-p4.sh
t/t9800-git-p4-basic.sh
t/t9806-git-p4-options.sh

index 309db31683e68161fd6e496bbc33f23f47ee29c2..31d75ae0434221ba50f805eee718b910a9cf677a 100644 (file)
@@ -99,5 +99,6 @@ kill_p4d() {
 }
 
 cleanup_git() {
-       rm -rf "$git"
+       rm -rf "$git" &&
+       mkdir "$git"
 }
index 60c1f57ebe7030119c228872b8dc1fc94349e836..234f72720e46b9cd5bb165fd71ee6401b278c9c6 100755 (executable)
@@ -270,6 +270,7 @@ test_expect_success 'wildcard files submit back to p4, delete' '
 '
 
 test_expect_success 'clone bare' '
+       rm -rf "$git" &&
        git p4 clone --dest="$git" --bare //depot &&
        test_when_finished cleanup_git &&
        (
index a37c6cbd7c7704636f405fc8ce6059c79933e24a..fa40cc8bb59a4e785681013e1dc676709d808410 100755 (executable)
@@ -149,7 +149,6 @@ test_expect_success 'clone --use-client-spec' '
        cleanup_git &&
 
        # same thing again, this time with variable instead of option
-       mkdir "$git" &&
        (
                cd "$git" &&
                git init &&