Skip to content

Commit

Permalink
git p4 test: cleanup_git should make a new $git
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pete Wyckoff authored and Junio C Hamano committed Jun 28, 2012
1 parent f69b3a9 commit 23a2666
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion t/lib-git-p4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,6 @@ kill_p4d() {
}

cleanup_git() {
rm -rf "$git"
rm -rf "$git" &&
mkdir "$git"
}
1 change: 1 addition & 0 deletions t/t9800-git-p4-basic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
(
Expand Down
1 change: 0 additions & 1 deletion t/t9806-git-p4-options.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit 23a2666

Please sign in to comment.