@matheusbsbs / matheus-bagliano / commits / 18bf879817
Fork 0

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>

Johannes Sixt committed Feb 25, 2009 at 22:34 UTC 18bf879817a725c1312059c91d18c9848acb3dfc
1 file changed +5 -10
t/t5302-pack-index.sh
+5 -10
@@ -69,32 +69,27 @@ test_expect_success \
69 'index v2: force some 64-bit offsets with pack-objects' \
70 'pack3=$(git pack-objects --index-version=2,0x40000 test-3 <obj-list)'
71
72 -have_64bits=
72 if msg=$(git verify-pack -v "test-3-${pack3}.pack" 2>&1) ||
73 ! (echo "$msg" | grep "pack too large .* off_t")
74 then
76 - have_64bits=t
75 + test_set_prereq OFF64_T
76 else
77 say "skipping tests concerning 64-bit offsets"
78 fi
79
81 -test "$have_64bits" &&
82 -test_expect_success \
80 +test_expect_success OFF64_T \
81 'index v2: verify a pack with some 64-bit offsets' \
82 'git verify-pack -v "test-3-${pack3}.pack"'
83
86 -test "$have_64bits" &&
87 -test_expect_success \
84 +test_expect_success OFF64_T \
85 '64-bit offsets: should be different from previous index v2 results' \
86 '! cmp "test-2-${pack2}.idx" "test-3-${pack3}.idx"'
87
91 -test "$have_64bits" &&
92 -test_expect_success \
88 +test_expect_success OFF64_T \
89 'index v2: force some 64-bit offsets with index-pack' \
90 'git index-pack --index-version=2,0x40000 -o 3.idx "test-1-${pack1}.pack"'
91
96 -test "$have_64bits" &&
97 -test_expect_success \
92 +test_expect_success OFF64_T \
93 '64-bit offsets: index-pack result should match pack-objects one' \
94 'cmp "test-3-${pack3}.idx" "3.idx"'
95