t5800: use skip_all instead of prereq

All tests require python 2.4 or higher. Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sverre Rabbelier committed Jul 16, 2011 at 15:03 UTC 760fec7d7e488899137d662c0b0d1addd20c516e
1 file changed +19 -15
t/t5800-remote-helpers.sh
+19 -15
@@ -7,15 +7,19 @@ test_description='Test remote-helper import and export commands'
7
8 . ./test-lib.sh
9
10 -if test_have_prereq PYTHON && "$PYTHON_PATH" -c '
10 +if ! test_have_prereq PYTHON ; then
11 + skip_all='skipping git-remote-hg tests, python not available'
12 + test_done
13 +fi
14 +
15 +"$PYTHON_PATH" -c '
16 import sys
17 if sys.hexversion < 0x02040000:
18 sys.exit(1)
14 -'
15 -then
16 - # Requires Python 2.4 or newer
17 - test_set_prereq PYTHON_24
18 -fi
19 +' || {
20 + skip_all='skipping git-remote-hg tests, python version < 2.4'
21 + test_done
22 +}
23
24 compare_refs() {
25 git --git-dir="$1/.git" rev-parse --verify $2 >expect &&
@@ -23,7 +27,7 @@ compare_refs() {
27 test_cmp expect actual
28 }
29
26 -test_expect_success PYTHON_24 'setup repository' '
30 +test_expect_success 'setup repository' '
31 git init --bare server/.git &&
32 git clone server public &&
33 (cd public &&
@@ -33,34 +37,34 @@ test_expect_success PYTHON_24 'setup repository' '
37 git push origin master)
38 '
39
36 -test_expect_success PYTHON_24 'cloning from local repo' '
40 +test_expect_success 'cloning from local repo' '
41 git clone "testgit::${PWD}/server" localclone &&
42 test_cmp public/file localclone/file
43 '
44
41 -test_expect_success PYTHON_24 'cloning from remote repo' '
45 +test_expect_success 'cloning from remote repo' '
46 git clone "testgit::file://${PWD}/server" clone &&
47 test_cmp public/file clone/file
48 '
49
46 -test_expect_success PYTHON_24 'create new commit on remote' '
50 +test_expect_success 'create new commit on remote' '
51 (cd public &&
52 echo content >>file &&
53 git commit -a -m two &&
54 git push)
55 '
56
53 -test_expect_success PYTHON_24 'pulling from local repo' '
57 +test_expect_success 'pulling from local repo' '
58 (cd localclone && git pull) &&
59 test_cmp public/file localclone/file
60 '
61
58 -test_expect_success PYTHON_24 'pulling from remote remote' '
62 +test_expect_success 'pulling from remote remote' '
63 (cd clone && git pull) &&
64 test_cmp public/file clone/file
65 '
66
63 -test_expect_success PYTHON_24 'pushing to local repo' '
67 +test_expect_success 'pushing to local repo' '
68 (cd localclone &&
69 echo content >>file &&
70 git commit -a -m three &&
@@ -68,12 +72,12 @@ test_expect_success PYTHON_24 'pushing to local repo' '
72 compare_refs localclone HEAD server HEAD
73 '
74
71 -test_expect_success PYTHON_24 'synch with changes from localclone' '
75 +test_expect_success 'synch with changes from localclone' '
76 (cd clone &&
77 git pull)
78 '
79
76 -test_expect_success PYTHON_24 'pushing remote local repo' '
80 +test_expect_success 'pushing remote local repo' '
81 (cd clone &&
82 echo content >>file &&
83 git commit -a -m four &&