@@ -18,7 +18,7 @@ inst_prefix=$(
18
18
)
19
19
20
20
force= with_dash= test_long= M= install= doc= notest= bootstrap= branches= jobs=
21
- scratch= noprove= memtrash=--memtrash with_cocci= san= clean=
21
+ scratch= noprove= memtrash=--memtrash with_cocci= with_leaks= with_sha256= san= clean=
22
22
while case " $1 " in
23
23
--pedantic | --locale=* | --loose) M=" $M $1 " ;;
24
24
--force) force=$1 ;;
@@ -41,6 +41,8 @@ while case "$1" in
41
41
--branches=* ) branches=${1#* =} ;;
42
42
--noprove) noprove=$1 ;;
43
43
--san) san=t ;;
44
+ --leaks) with_leaks=t ;;
45
+ --sha256) with_sha256=t ;;
44
46
-j* ) jobs=$1 ;;
45
47
--) shift ; break ;;
46
48
-* ) echo >&2 " Unknown option: $1 " ; exit 1 ;;
229
231
230
232
save=$( git rev-parse HEAD) &&
231
233
234
+ # cocci
232
235
if test -n " $with_cocci "
233
236
then
234
237
Meta/Make $M $jobs -- coccicheck
235
238
fi &&
236
239
240
+ # sparse
237
241
Meta/Make $M $jobs -- NO_REGEX=NoThanks \
238
242
SPARSE_FLAGS=-Wsparse-error sparse &&
239
243
rm -f compat/regex/regex.o &&
244
+
245
+ # hdr
240
246
Meta/Make $M $jobs -- hdr-check &&
241
247
248
+ # SANITIZE=address,undefined
242
249
case " $dotest ,$san " in
243
250
' ' )
244
251
;;
252
259
;;
253
260
esac &&
254
261
262
+ # sha256
263
+ if test -n " $with_sha256 "
264
+ then
265
+ (
266
+ export GIT_TEST_DEFAULT_HASH=sha256
267
+ Meta/Make -j16 $T test &&
268
+ Meta/Make > /dev/null distclean
269
+ )
270
+ fi &&
271
+
272
+ # docs
255
273
{
256
274
test -n " $skip_doc " ||
257
275
if test " $save " = " $( git rev-parse HEAD) "
264
282
fi
265
283
} &&
266
284
285
+ # leaks
286
+ if test -n " with_leaks"
287
+ then
288
+ (
289
+ export SANITIZE=leak
290
+ export GIT_TEST_PASSING_SANITIZE_LEAK=true
291
+ Meta/Make -j16 $T CC=clang test &&
292
+ Meta/Make -j16 > /dev/null distclean
293
+ )
294
+ fi &&
295
+
267
296
{
268
297
test z$install = znoinstall ||
269
298
if test " $save " = " $( git rev-parse HEAD) "
0 commit comments