]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Dothem: run with leaks and sha256
authorJunio C Hamano <gitster@pobox.com>
Fri, 13 Dec 2024 16:54:47 +0000 (08:54 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 13 Dec 2024 16:54:47 +0000 (08:54 -0800)
Dothem

diff --git a/Dothem b/Dothem
index 6598da676b618111bbd1c1c26e4cf91cc3f7281f..82a243b11932441dfffd474d34e7b92d11234eaa 100755 (executable)
--- a/Dothem
+++ b/Dothem
@@ -18,7 +18,7 @@ inst_prefix=$(
 )
 
 force= with_dash= test_long= M= install= doc= notest= bootstrap= branches= jobs=
-scratch= noprove= memtrash=--memtrash with_cocci= san= clean=
+scratch= noprove= memtrash=--memtrash with_cocci= with_leaks= with_sha256= san= clean=
 while  case "$1" in
        --pedantic | --locale=* | --loose) M="$M $1" ;;
        --force) force=$1 ;;
@@ -41,6 +41,8 @@ while case "$1" in
        --branches=*) branches=${1#*=} ;;
        --noprove) noprove=$1 ;;
        --san) san=t ;;
+       --leaks) with_leaks=t ;;
+       --sha256) with_sha256=t ;;
        -j*) jobs=$1 ;;
        --) shift; break ;;
        -*) echo >&2 "Unknown option: $1"; exit 1 ;;
@@ -229,16 +231,21 @@ do
 
                save=$(git rev-parse HEAD) &&
 
+               # cocci
                if test -n "$with_cocci"
                then
                        Meta/Make $M $jobs -- coccicheck
                fi &&
 
+               # sparse
                Meta/Make $M $jobs -- NO_REGEX=NoThanks \
                        SPARSE_FLAGS=-Wsparse-error sparse &&
                rm -f compat/regex/regex.o &&
+
+               # hdr
                Meta/Make $M $jobs -- hdr-check &&
 
+               # SANITIZE=address,undefined
                case "$dotest,$san" in
                '')
                        ;;
@@ -252,6 +259,17 @@ do
                        ;;
                esac &&
 
+               # sha256
+               if test -n "$with_sha256"
+               then
+                       (
+                               export GIT_TEST_DEFAULT_HASH=sha256
+                               Meta/Make -j16 $T test &&
+                               Meta/Make >/dev/null distclean
+                       )
+               fi &&
+
+               # docs
                {
                        test -n "$skip_doc" ||
                        if test "$save" = "$(git rev-parse HEAD)"
@@ -264,6 +282,17 @@ do
                        fi
                } &&
 
+               # leaks
+               if test -n "with_leaks"
+               then
+                       (
+                               export SANITIZE=leak
+                               export GIT_TEST_PASSING_SANITIZE_LEAK=true
+                               Meta/Make -j16 $T CC=clang test &&
+                               Meta/Make -j16 >/dev/null distclean
+                       )
+               fi &&
+
                {
                        test z$install = znoinstall ||
                        if test "$save" = "$(git rev-parse HEAD)"