Meta/Dothem: make individual tests more independent

Junio C Hamano committed Mar 7, 2026 at 14:35 UTC bb4fe16695bb49412285746e9745b9a51518a822
1 file changed +14 -2
Dothem
+14 -2
@@ -47,13 +47,17 @@ while case "$1" in
47 --test=*) test="$1" ;;
48 --scratch) scratch=y ;;
49 --breaking) breaking=breaking ;;
50 + --no-breaking) breaking= ;;
51 --bootstrap) bootstrap=y ;;
52 --base=*) BUILDBASE=${1#*=} ;;
53 --branches=*) branches=${1#*=} ;;
54 --noprove) noprove=$1 ;;
55 --san) san=t ;;
56 + --no-san) san= ;;
57 --leaks) with_leaks=t ;;
58 + --no-leaks) with_leaks= ;;
59 --sha256) with_sha256=t ;;
60 + --no-sha256) with_sha256= ;;
61 --meson) with_meson=t ;;
62 -j*) jobs=$1 ;;
63 --) shift; break ;;
@@ -279,9 +283,11 @@ do
283 section test-lint
284 Meta/Make -- -C t test-lint &&
285
286 + did_test=
287 if test -n "$san"
288 then
289 section SANITIZE=address,undefined
290 + did_test=did_test
291 SANITIZE=address,undefined Meta/Make $M $jobs $T test &&
292 rm -f compat/mmap.o &&
293 Meta/Make >/dev/null distclean
@@ -289,6 +295,7 @@ do
295 if test -n "$with_leaks"
296 then
297 section leaks
298 + did_test=did_test
299 SANITIZE=leak \
300 GIT_TEST_PASSING_SANITIZE_LEAK=true \
301 Meta/Make $jobs $T CC=clang test &&
@@ -297,16 +304,19 @@ do
304 if test -n "$with_sha256"
305 then
306 section sha256
307 + did_test=did_test
308 GIT_TEST_DEFAULT_HASH=sha256 Meta/Make $jobs $T test
309 fi &&
310 if test -n "$breaking"
311 then
312 section breaking
313 + did_test=did_test
314 + Meta/Make >/dev/null distclean &&
315 Meta/Make $jobs WITH_BREAKING_CHANGES=YesPlease $T test &&
316 Meta/Make >/dev/null distclean
317 fi &&
318
309 - if test "$san$breaking$with_leaks$breaking$with_sha256$dotest" = test
319 + if test "$did_test$dotest" = test
320 then
321 section test
322 Meta/Make $M $noprove ${test+"$test"} $jobs $test_long \
@@ -333,7 +343,9 @@ do
343 if test "$save" = "$(git rev-parse HEAD)"
344 then
345 section install
336 - Meta/Make $jobs $M -- ${with_dash:+SHELL_PATH=/bin/dash} "$@" install
346 + Meta/Make >/dev/null distclean &&
347 + Meta/Make $jobs $M \
348 + -- ${with_dash:+SHELL_PATH=/bin/dash} "$@" install
349 else
350 echo >&2 "Head moved--not installing"
351 fi