summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2009-02-25 21:34:34 (GMT)
committerJohannes Sixt <j6t@kdbg.org>2009-03-22 16:26:44 (GMT)
commit18bf879817a725c1312059c91d18c9848acb3dfc (patch)
tree74dc3af87559ed31daaf34d9487dc006396458c4
parent872f349e7b119fcef7306f5dd7e4492ee3598318 (diff)
downloadgit-18bf879817a725c1312059c91d18c9848acb3dfc.zip
git-18bf879817a725c1312059c91d18c9848acb3dfc.tar.gz
git-18bf879817a725c1312059c91d18c9848acb3dfc.tar.bz2
t5302: Use prerequisite tags to skip 64-bit offset tests
The effects of this patch can be tested on Linux by commenting out #define _FILE_OFFSET_BITS 64 in git-compat-util.h. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
-rwxr-xr-xt/t5302-pack-index.sh15
1 files changed, 5 insertions, 10 deletions
diff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh
index 77982cd..4360e77 100755
--- a/t/t5302-pack-index.sh
+++ b/t/t5302-pack-index.sh
@@ -69,32 +69,27 @@ test_expect_success \
'index v2: force some 64-bit offsets with pack-objects' \
'pack3=$(git pack-objects --index-version=2,0x40000 test-3 <obj-list)'
-have_64bits=
if msg=$(git verify-pack -v "test-3-${pack3}.pack" 2>&1) ||
! (echo "$msg" | grep "pack too large .* off_t")
then
- have_64bits=t
+ test_set_prereq OFF64_T
else
say "skipping tests concerning 64-bit offsets"
fi
-test "$have_64bits" &&
-test_expect_success \
+test_expect_success OFF64_T \
'index v2: verify a pack with some 64-bit offsets' \
'git verify-pack -v "test-3-${pack3}.pack"'
-test "$have_64bits" &&
-test_expect_success \
+test_expect_success OFF64_T \
'64-bit offsets: should be different from previous index v2 results' \
'! cmp "test-2-${pack2}.idx" "test-3-${pack3}.idx"'
-test "$have_64bits" &&
-test_expect_success \
+test_expect_success OFF64_T \
'index v2: force some 64-bit offsets with index-pack' \
'git index-pack --index-version=2,0x40000 -o 3.idx "test-1-${pack1}.pack"'
-test "$have_64bits" &&
-test_expect_success \
+test_expect_success OFF64_T \
'64-bit offsets: index-pack result should match pack-objects one' \
'cmp "test-3-${pack3}.idx" "3.idx"'