Skip to content

Commit

Permalink
t/t5705-clone-2gb: change from skip_all=* to prereq skip
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
avar authored and gitster committed Aug 18, 2010
1 parent 063b7e0 commit 2c7e134
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions t/t5705-clone-2gb.sh
Expand Up @@ -3,12 +3,14 @@
test_description='Test cloning a repository larger than 2 gigabyte' test_description='Test cloning a repository larger than 2 gigabyte'
. ./test-lib.sh . ./test-lib.sh


test -z "$GIT_TEST_CLONE_2GB" && if test -z "$GIT_TEST_CLONE_2GB"
skip_all="Skipping expensive 2GB clone test; enable it with GIT_TEST_CLONE_2GB=t" && then
test_done && say 'Skipping expensive 2GB clone test; enable it with GIT_TEST_CLONE_2GB=t'
exit else
test_set_prereq CLONE_2GB
fi


test_expect_success 'setup' ' test_expect_success CLONE_2GB 'setup' '
git config pack.compression 0 && git config pack.compression 0 &&
git config pack.depth 0 && git config pack.depth 0 &&
Expand Down Expand Up @@ -36,13 +38,13 @@ test_expect_success 'setup' '
' '


test_expect_success 'clone - bare' ' test_expect_success CLONE_2GB 'clone - bare' '
git clone --bare --no-hardlinks . clone-bare git clone --bare --no-hardlinks . clone-bare
' '


test_expect_success 'clone - with worktree, file:// protocol' ' test_expect_success CLONE_2GB 'clone - with worktree, file:// protocol' '
git clone file://. clone-wt git clone file://. clone-wt
Expand Down

0 comments on commit 2c7e134

Please sign in to comment.