Skip to content

Commit 760fec7

Browse files
SRabbeliergitster
authored andcommitted
t5800: use skip_all instead of prereq
All tests require python 2.4 or higher. Signed-off-by: Sverre Rabbelier <[email protected]> Acked-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5cf5ade commit 760fec7

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

t/t5800-remote-helpers.sh

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,27 @@ test_description='Test remote-helper import and export commands'
77

88
. ./test-lib.sh
99

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 '
1116
import sys
1217
if sys.hexversion < 0x02040000:
1318
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+
}
1923

2024
compare_refs() {
2125
git --git-dir="$1/.git" rev-parse --verify $2 >expect &&
2226
git --git-dir="$3/.git" rev-parse --verify $4 >actual &&
2327
test_cmp expect actual
2428
}
2529

26-
test_expect_success PYTHON_24 'setup repository' '
30+
test_expect_success 'setup repository' '
2731
git init --bare server/.git &&
2832
git clone server public &&
2933
(cd public &&
@@ -33,47 +37,47 @@ test_expect_success PYTHON_24 'setup repository' '
3337
git push origin master)
3438
'
3539

36-
test_expect_success PYTHON_24 'cloning from local repo' '
40+
test_expect_success 'cloning from local repo' '
3741
git clone "testgit::${PWD}/server" localclone &&
3842
test_cmp public/file localclone/file
3943
'
4044

41-
test_expect_success PYTHON_24 'cloning from remote repo' '
45+
test_expect_success 'cloning from remote repo' '
4246
git clone "testgit::file://${PWD}/server" clone &&
4347
test_cmp public/file clone/file
4448
'
4549

46-
test_expect_success PYTHON_24 'create new commit on remote' '
50+
test_expect_success 'create new commit on remote' '
4751
(cd public &&
4852
echo content >>file &&
4953
git commit -a -m two &&
5054
git push)
5155
'
5256

53-
test_expect_success PYTHON_24 'pulling from local repo' '
57+
test_expect_success 'pulling from local repo' '
5458
(cd localclone && git pull) &&
5559
test_cmp public/file localclone/file
5660
'
5761

58-
test_expect_success PYTHON_24 'pulling from remote remote' '
62+
test_expect_success 'pulling from remote remote' '
5963
(cd clone && git pull) &&
6064
test_cmp public/file clone/file
6165
'
6266

63-
test_expect_success PYTHON_24 'pushing to local repo' '
67+
test_expect_success 'pushing to local repo' '
6468
(cd localclone &&
6569
echo content >>file &&
6670
git commit -a -m three &&
6771
git push) &&
6872
compare_refs localclone HEAD server HEAD
6973
'
7074

71-
test_expect_success PYTHON_24 'synch with changes from localclone' '
75+
test_expect_success 'synch with changes from localclone' '
7276
(cd clone &&
7377
git pull)
7478
'
7579

76-
test_expect_success PYTHON_24 'pushing remote local repo' '
80+
test_expect_success 'pushing remote local repo' '
7781
(cd clone &&
7882
echo content >>file &&
7983
git commit -a -m four &&

0 commit comments

Comments
 (0)