Dothem: fix 'leaks' mode

Junio C Hamano committed Dec 13, 2024 at 15:31 UTC dc149545c20f3d3c31ebfcbb75fe4a3971a21926
1 file changed +16 -1
Dothem
+16 -1
@@ -3,6 +3,12 @@
3 NWD=contrib/workdir/git-new-workdir
4 MASTER=master
5
6 +section () {
7 + printf "\n\n\n"
8 + printf "############ %s\n" "$@"
9 + printf "\n\n\n"
10 +}
11 +
12 inst_prefix=$(
13 IFS=:
14 for p in $PATH
@@ -234,15 +240,18 @@ do
240 # cocci
241 if test -n "$with_cocci"
242 then
243 + section coccicheck
244 Meta/Make $M $jobs -- coccicheck
245 fi &&
246
247 # sparse
248 + section sparse
249 Meta/Make $M $jobs -- NO_REGEX=NoThanks \
250 SPARSE_FLAGS=-Wsparse-error sparse &&
251 rm -f compat/regex/regex.o &&
252
253 # hdr
254 + section hdr-check
255 Meta/Make $M $jobs -- hdr-check &&
256
257 # SANITIZE=address,undefined
@@ -250,10 +259,12 @@ do
259 '')
260 ;;
261 test,)
262 + section test
263 Meta/Make $M $noprove ${test+"$test"} $jobs $test_long $memtrash \
264 -- ${with_dash:+SHELL_PATH=/bin/dash} "$@" $dotest
265 ;;
266 *,t)
267 + section SANITIZE=address,undefined
268 SANITIZE=address,undefined Meta/Make $M $jobs test &&
269 Meta/Make >/dev/null distclean
270 ;;
@@ -262,6 +273,7 @@ do
273 # sha256
274 if test -n "$with_sha256"
275 then
276 + section sha256
277 (
278 export GIT_TEST_DEFAULT_HASH=sha256
279 Meta/Make -j16 $T test &&
@@ -274,6 +286,7 @@ do
286 test -n "$skip_doc" ||
287 if test "$save" = "$(git rev-parse HEAD)"
288 then
289 + section docs
290 Meta/Make $M $jobs -- check-docs &&
291 Meta/Make $M $jobs -- $USE_ASCIIDOCTOR doc &&
292 Meta/Make $M -- install-man install-html
@@ -283,8 +296,9 @@ do
296 } &&
297
298 # leaks
286 - if test -n "with_leaks"
299 + if test -n "$with_leaks"
300 then
301 + section leaks
302 (
303 export SANITIZE=leak
304 export GIT_TEST_PASSING_SANITIZE_LEAK=true
@@ -297,6 +311,7 @@ do
311 test z$install = znoinstall ||
312 if test "$save" = "$(git rev-parse HEAD)"
313 then
314 + section install
315 Meta/Make $M -- ${with_dash:+SHELL_PATH=/bin/dash} "$@" install
316 else
317 echo >&2 "Head moved--not installing"