mirror of
https://github.com/git/git
synced 2024-08-25 02:35:46 +00:00
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>
This commit is contained in:
parent
872f349e7b
commit
18bf879817
|
@ -69,32 +69,27 @@ test_expect_success \
|
||||||
'index v2: force some 64-bit offsets with pack-objects' \
|
'index v2: force some 64-bit offsets with pack-objects' \
|
||||||
'pack3=$(git pack-objects --index-version=2,0x40000 test-3 <obj-list)'
|
'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) ||
|
if msg=$(git verify-pack -v "test-3-${pack3}.pack" 2>&1) ||
|
||||||
! (echo "$msg" | grep "pack too large .* off_t")
|
! (echo "$msg" | grep "pack too large .* off_t")
|
||||||
then
|
then
|
||||||
have_64bits=t
|
test_set_prereq OFF64_T
|
||||||
else
|
else
|
||||||
say "skipping tests concerning 64-bit offsets"
|
say "skipping tests concerning 64-bit offsets"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
test "$have_64bits" &&
|
test_expect_success OFF64_T \
|
||||||
test_expect_success \
|
|
||||||
'index v2: verify a pack with some 64-bit offsets' \
|
'index v2: verify a pack with some 64-bit offsets' \
|
||||||
'git verify-pack -v "test-3-${pack3}.pack"'
|
'git verify-pack -v "test-3-${pack3}.pack"'
|
||||||
|
|
||||||
test "$have_64bits" &&
|
test_expect_success OFF64_T \
|
||||||
test_expect_success \
|
|
||||||
'64-bit offsets: should be different from previous index v2 results' \
|
'64-bit offsets: should be different from previous index v2 results' \
|
||||||
'! cmp "test-2-${pack2}.idx" "test-3-${pack3}.idx"'
|
'! cmp "test-2-${pack2}.idx" "test-3-${pack3}.idx"'
|
||||||
|
|
||||||
test "$have_64bits" &&
|
test_expect_success OFF64_T \
|
||||||
test_expect_success \
|
|
||||||
'index v2: force some 64-bit offsets with index-pack' \
|
'index v2: force some 64-bit offsets with index-pack' \
|
||||||
'git index-pack --index-version=2,0x40000 -o 3.idx "test-1-${pack1}.pack"'
|
'git index-pack --index-version=2,0x40000 -o 3.idx "test-1-${pack1}.pack"'
|
||||||
|
|
||||||
test "$have_64bits" &&
|
test_expect_success OFF64_T \
|
||||||
test_expect_success \
|
|
||||||
'64-bit offsets: index-pack result should match pack-objects one' \
|
'64-bit offsets: index-pack result should match pack-objects one' \
|
||||||
'cmp "test-3-${pack3}.idx" "3.idx"'
|
'cmp "test-3-${pack3}.idx" "3.idx"'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue