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
200200ifndef NO_OPENSSL
201201 LIB_OBJS += epoch.o
202202 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
203210else
204211 DEFINES += '-DNO_OPENSSL'
205212 MOZILLA_SHA1 = 1
206213 OPENSSL_LIBSSL =
207214endif
208215ifdef NEEDS_SSL_WITH_CRYPTO
209- LIB_4_CRYPTO = -lcrypto -lssl
216+ LIB_4_CRYPTO = $(OPENSSL_LINK) -lcrypto -lssl
210217else
211- LIB_4_CRYPTO = -lcrypto
218+ LIB_4_CRYPTO = $(OPENSSL_LINK) -lcrypto
212219endif
213220ifdef 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
215229else
216230 LIB_4_ICONV =
217231endif
Original file line number Diff line number Diff line change 55
66# GIT_TEST_OPTS=--verbose --debug
77SHELL_PATH ?= $(SHELL )
8+ TAR ?= $(TAR )
89
910T = $(wildcard t[0-9][0-9][0-9][0-9]-* .sh)
1011
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ test_expect_success \
5050
5151test_expect_success \
5252 ' validate file modification time' \
53- ' TZ=GMT tar tvf b.tar a/a |
53+ ' TZ=GMT $TAR tvf b.tar a/a |
5454 awk \{print\ \$4,\ \(length\(\$5\)\<7\)\ ?\ \$5\":00\"\ :\ \$5\} \
5555 >b.mtime &&
5656 echo "2005-05-27 22:00:00" >expected.mtime &&
@@ -63,7 +63,7 @@ test_expect_success \
6363
6464test_expect_success \
6565 ' extract tar archive' \
66- ' (cd b && tar xf -) <b.tar'
66+ ' (cd b && $TAR xf -) <b.tar'
6767
6868test_expect_success \
6969 ' validate filenames' \
@@ -80,7 +80,7 @@ test_expect_success \
8080
8181test_expect_success \
8282 ' extract tar archive with prefix' \
83- ' (cd c && tar xf -) <c.tar'
83+ ' (cd c && $TAR xf -) <c.tar'
8484
8585test_expect_success \
8686 ' 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'
77. ./test-lib.sh
88. ../t6000lib.sh # t6xxx specific functions
99
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-
2410# usage: test_bisection max-diff bisect-option head ^prune...
2511#
2612# e.g. test_bisection 1 --bisect l1 ^l0
@@ -35,8 +21,19 @@ test_bisection_diff()
3521 _head=$1
3622 shift 1
3723 _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'
4037}
4138
4239date > path0
You can’t perform that action at this time.
0 commit comments