File tree Expand file tree Collapse file tree 4 files changed +34
-22
lines changed Expand file tree Collapse file tree 4 files changed +34
-22
lines changed Original file line number Diff line number Diff line change @@ -200,18 +200,32 @@ endif
200
200
ifndef NO_OPENSSL
201
201
LIB_OBJS += epoch.o
202
202
OPENSSL_LIBSSL = -lssl
203
+ ifdef OPENSSLDIR
204
+ # Again this may be problematic -- gcc does not always want -R.
205
+ CFLAGS += -I$(OPENSSLDIR)/include
206
+ OPENSSL_LINK = -L$(OPENSSLDIR)/lib -R$(OPENSSLDIR)/lib
207
+ else
208
+ OPENSSL_LINK =
209
+ endif
203
210
else
204
211
DEFINES += '-DNO_OPENSSL'
205
212
MOZILLA_SHA1 = 1
206
213
OPENSSL_LIBSSL =
207
214
endif
208
215
ifdef NEEDS_SSL_WITH_CRYPTO
209
- LIB_4_CRYPTO = -lcrypto -lssl
216
+ LIB_4_CRYPTO = $(OPENSSL_LINK) -lcrypto -lssl
210
217
else
211
- LIB_4_CRYPTO = -lcrypto
218
+ LIB_4_CRYPTO = $(OPENSSL_LINK) -lcrypto
212
219
endif
213
220
ifdef NEEDS_LIBICONV
214
- LIB_4_ICONV = -liconv
221
+ ifdef ICONVDIR
222
+ # Again this may be problematic -- gcc does not always want -R.
223
+ CFLAGS += -I$(ICONVDIR)/include
224
+ ICONV_LINK = -L$(ICONVDIR)/lib -R$(ICONVDIR)/lib
225
+ else
226
+ ICONV_LINK =
227
+ endif
228
+ LIB_4_ICONV = $(ICONV_LINK) -liconv
215
229
else
216
230
LIB_4_ICONV =
217
231
endif
Original file line number Diff line number Diff line change 5
5
6
6
# GIT_TEST_OPTS=--verbose --debug
7
7
SHELL_PATH ?= $(SHELL )
8
+ TAR ?= $(TAR )
8
9
9
10
T = $(wildcard t[0-9][0-9][0-9][0-9]-* .sh)
10
11
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ test_expect_success \
50
50
51
51
test_expect_success \
52
52
' validate file modification time' \
53
- ' TZ=GMT tar tvf b.tar a/a |
53
+ ' TZ=GMT $TAR tvf b.tar a/a |
54
54
awk \{print\ \$4,\ \(length\(\$5\)\<7\)\ ?\ \$5\":00\"\ :\ \$5\} \
55
55
>b.mtime &&
56
56
echo "2005-05-27 22:00:00" >expected.mtime &&
@@ -63,7 +63,7 @@ test_expect_success \
63
63
64
64
test_expect_success \
65
65
' extract tar archive' \
66
- ' (cd b && tar xf -) <b.tar'
66
+ ' (cd b && $TAR xf -) <b.tar'
67
67
68
68
test_expect_success \
69
69
' validate filenames' \
@@ -80,7 +80,7 @@ test_expect_success \
80
80
81
81
test_expect_success \
82
82
' extract tar archive with prefix' \
83
- ' (cd c && tar xf -) <c.tar'
83
+ ' (cd c && $TAR xf -) <c.tar'
84
84
85
85
test_expect_success \
86
86
' validate filenames with prefix' \
Original file line number Diff line number Diff line change @@ -7,20 +7,6 @@ test_description='Tests git-rev-list --bisect functionality'
7
7
. ./test-lib.sh
8
8
. ../t6000lib.sh # t6xxx specific functions
9
9
10
- bc_expr ()
11
- {
12
- bc << EOF
13
- scale=1
14
- define abs(x) {
15
- if (x>=0) { return (x); } else { return (-x); }
16
- }
17
- define floor(x) {
18
- save=scale; scale=0; result=x/1; scale=save; return (result);
19
- }
20
- $*
21
- EOF
22
- }
23
-
24
10
# usage: test_bisection max-diff bisect-option head ^prune...
25
11
#
26
12
# e.g. test_bisection 1 --bisect l1 ^l0
@@ -35,8 +21,19 @@ test_bisection_diff()
35
21
_head=$1
36
22
shift 1
37
23
_bisection_size=$( git-rev-list $_bisection " $@ " | wc -l)
38
- [ -n " $_list_size " -a -n " $_bisection_size " ] || error " test_bisection_diff failed"
39
- test_expect_success " bisection diff $_bisect_option $_head $* <= $_max_diff " " [ $( bc_expr " floor(abs($_list_size /2)-$_bisection_size )" ) -le $_max_diff ]"
24
+ [ -n " $_list_size " -a -n " $_bisection_size " ] ||
25
+ error " test_bisection_diff failed"
26
+
27
+ # Test if bisection size is close to half of list size within
28
+ # tolerance.
29
+ #
30
+ _bisect_err=` expr $_list_size - $_bisection_size \* 2`
31
+ test " $_bisect_err " -lt 0 && _bisect_err=` expr 0 - $_bisect_err `
32
+ _bisect_err=` expr $_bisect_err / 2` ; # floor
33
+
34
+ test_expect_success \
35
+ " bisection diff $_bisect_option $_head $* <= $_max_diff " \
36
+ ' test $_bisect_err -le $_max_diff'
40
37
}
41
38
42
39
date > path0
You can’t perform that action at this time.
0 commit comments